Loading a page and executing a script local to that page

  • sarsonuk
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Mar 24, 2004
  • Posts: 7
  • Loc: UK
  • Status: Offline

Post March 25th, 2004, 5:44 pm

I am trying to load a page and execute a javascript local to that page in one line of syntax.
I can get the page to load but I cannot get the script to execute even though I get no errors.
I do the following :-

javascript:parent.mainFrame.location.href='./america_ss.html';javascript:parent.mainFrame.setslide(3)"

Am I miss understanding the second option? I have tried just executing the setslide function without the frame option but none have worked.

Can anyone help?
Thanks
Pete
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 25th, 2004, 5:44 pm

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 25th, 2004, 7:22 pm

Are you trying to execute a script in the page that is being loaded ? try adding the call to the function to the onload event of the page being loadeds' body tag
Code: [ Select ]
page being loaded.....

function setslide(par){
    doSomthing;
}
</script>
<body onload="setslide(3)">
  1. page being loaded.....
  2. function setslide(par){
  3.     doSomthing;
  4. }
  5. </script>
  6. <body onload="setslide(3)">
Strong with this one, the sudo is.
  • sarsonuk
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Mar 24, 2004
  • Posts: 7
  • Loc: UK
  • Status: Offline

Post March 25th, 2004, 7:47 pm

The setslide function that you can see sets an array index loaded with paths to images.
I want to use a menu on another page to call one page then execute the setslide(num) function i.e. I'm independantly controlling the num variable from outside the script so that I can play multiple slideshows in one html file.
If there is anyway of doing this I would much appreciate the information.

You can see what i'm trying to do at http://www.geocities.com/sarsonuk/travel.html then select america/sugarloaf in the menu.
The code I'm using at the moment loads the page but wont execute the script even though I get no error.

javascript:parent.mainFrame.location.href='./america_ss.html';javascript:parent.mainFrame.setslide(3)

Thanks inadvance
Pete
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 25th, 2004, 9:23 pm

The link you gave was riddled with javascript errors(at least in IE6) It's getting late here, I'll take a look at it tomarrow if someone hasn't gotten to it by then
Strong with this one, the sudo is.
  • sarsonuk
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Mar 24, 2004
  • Posts: 7
  • Loc: UK
  • Status: Offline

Post March 25th, 2004, 9:49 pm

Thanks, I don't see no errors on this side but I would very much appreciate it if you could help me tomorrow,
Good night
Thanks
Pete
  • sarsonuk
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Mar 24, 2004
  • Posts: 7
  • Loc: UK
  • Status: Offline

Post March 26th, 2004, 9:15 pm

I am trying to control a script by setting an integer when loading the webpage i.e
"javascriptarent.mainFrame.location.href='./america_ss.html?frame=3'"

I set the function by

onfiltered="javacript:SetSlide(<%=Request.QueryString['frame']%> )"

Opening the page works fine but setting the javacript function doesn't seem to be working

Does anyone have any suggestions and anyone tell me what the onfiltered function does?

This can be seen at http://www.geocities.com/sarsonuk/travel.html
then go to america/sugarloaf
if the code was executed correctly the Dallas photos should load up but they don't. By clicking the Dallas link you can see what should happen if the code is executed correctly

I have attached the files in question
Thanks in advance
Pete
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post March 27th, 2004, 10:54 pm

This is your problem right here.
Code: [ Select ]
onfiltered="javacript:SetSlide(<%=Request.QueryString['frame']%> )"


Geocities doesn't support ASP output directives.
If your looking for a free host that supports ASP try http://www.1asphost.com
Strong with this one, the sudo is.
  • sarsonuk
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Mar 24, 2004
  • Posts: 7
  • Loc: UK
  • Status: Offline

Post March 28th, 2004, 10:06 pm

Florida dude,
I set myself an account mate and have the following webpage http://ee.1asphost.com/sarsonuk

I have uplaoded my website and can see all my files(the zip function is sweet) but when I try and goto the actual page it doesn't load.
I have tried re-registering but it says I'm cool and have already registered so I have no idea what is wrong as it says

ERROR
The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: http://ee.1asphost.com/sarsonuk/index.html

The following error was encountered:

Connection Failed
The system returned:

(60) Connection timed outThe remote host or network may be down. Please try the request again.

Your cache administrator is support@stayonline.net.



--------------------------------------------------------------------------------

Generated Mon, 29 Mar 2004 05:02:22 GMT by guestpass (squid/2.5.STABLE1)

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: webspace and 124 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.