Web Hosting Talk







View Full Version : javascript help


simprobe3
06-27-2002, 11:42 AM
Hi! Im not sure if im allowed to post for help in these forum, please accept my apologies if I did something incorrect (Im new).

Anyway, Is anyone here a JS guru? Those are hard to find. If one of you doesn't mind, can you please help me out with one problem (for free). Im not that advanced in JS, but i have created some code and everything works fine until a certain point. JS says that the object is not specified, but IT IS!! And that object works fine until that line. If you have time to help me, please contact me.

Im not very good at JS, im mainly a PHP and ASP person :)

AIM: Simprobe3
Email: simprobe@mail.ru
icq (45485905 - usually not on, since i don't have it installed at work and dont want to install it :).)

Thanks in advance, this problem will most likely be very easy to solve for you! Heh

- Simon Dobretsov

Chang Lee
06-27-2002, 12:09 PM
what's the problem? and where's the problem (URL to code)?

simprobe3
06-27-2002, 01:49 PM
The problem is at
http://www.ucnetwork.com/index.asp

(the new site I am creating).. do you notice that error that pops up?? Please take a look at my code! I have no clue what is wrong with lin #73.

thanks,
simon

grandad
06-27-2002, 01:56 PM
I get:

Line: 79
Char: 1
Error: 'ifshowf.document' is null or not an object
Code: 0
URL: http://www.ucnetwork.com/index.asp

simprobe3
06-27-2002, 03:08 PM
yeah i know that part, i just don't know what i need to change to make it work!

grandad
06-27-2002, 03:18 PM
Sorry - just trying to help ... you said line 73, I got line 79.

MoSupaFly
06-27-2002, 04:09 PM
There are a few things....

first off... you have 2 functions with the same name "performcheck()". The first one isn't ever being run from the Body onLoad event because the 2nd function by the same name is taking precedent. Rename one of them to fix that and make sure you call it from the onLoad event.

Second... (and this is true for IE... not sure about Netscape or the others)... to assign the iframeshow and iframehold objects to a variable... all you need to do is:

ifshowf = document.all.iframeshow;
ifholdf = document.all.iframehold;

So that first set of if...else statements you're doing in the first performcheck() isn't working and should just be replaced by above (again... at least for IE).

That should fix things for you.

simprobe3
06-27-2002, 04:50 PM
HI!
thanks, all of that is just for compatibility.. i fixed everything you said and uploaded the new one.

Now it sorta works ,but I have a new bug. When ever you click on a link to the left (not the forum one), but a link that is supposed to open a page in the iframe it just opens the page in the window..and not the iframe!

can you help me with that??
thanks,
simon

MoSupaFly
06-27-2002, 05:32 PM
Let's see...

go to your gotourl() function and locate the line:

ifshowf.document.location.href=gotoloc;

Now comment out that line (just in case) and type in the following line:

ifshowf.src = gotoloc;

IFrames use the SRC property to specify its content. That should work now (hopefully).