Jump to content
View in the app

A better way to browse. Learn more.

300ZX Owners Club

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Currently got a piece of code that executes a javascript functionailty on a hyperlink....

 

Link

 

Works fine, but i want to refresh two documents at once, one after another e.g.

 

Link

 

Now am i using the right syntax to run to lines of javascript? I hate the effing thing, i thought you just used an end of line declaration eg ';' between each bit of code but its different in hyperlinks you have to put javascript: at the beginning

 

Anyone?????

Featured Replies

Yeah the problem is you cant call two functions from a href, you need to create a new Sub or function and within that sub / function do this:

 

Function RefreshPages()

 

{

loadXMLDoc('menu.php','menu');

loadXMLDoc('aContact Us.php','browse');

}

End Function

 

Then simply call the RefreshPages Sub from within the href like so.

 

Link

 

Please note, the syntax isnt 100% but the logic is correct :hyper:

  • Author
Yeah the problem is you cant call two functions from a href, you need to create a new Sub or function and within that sub / function do this:

 

Function RefreshPages()

 

{

loadXMLDoc('menu.php','menu');

loadXMLDoc('aContact Us.php','browse');

}

End Function

 

Then simply call the RefreshPages Sub from within the href like so.

 

Link

 

Please note, the syntax isnt 100% but the logic is correct :hyper:

 

 

I had the very same idea myself, tried it but the problem is that its controlling an ajax script. Think i have to write a delay in there between executing the first and second one otherwise it doesn't do anything.

 

Cheers matey, i'll let you know the finished solution

href won't allow two functions to be called but onMouseOver and other variants do, would that be any help? you can also call the same function twice using this method so should be useful.

 

just put a "#" in your href :)

failing that, put a refresh script in the function you are calling and pass a parameter to it!

  • Author

Tried adding a wait loop while it writes out the contents of the Xhttp request layer before executing the next update function but all it does is execute the second one. This is doing my head in now :( :headvswal :headvswal :headvswal :headvswal :headvswal :headvswal

did you try what i said mate?

  • Author

Yeah, thanks for the suggestion matey. its not that that's the problem now, i created a javascript function to call the two functions from that BUT for some reason it doesn't let the first call finish it just does the second, so i tried writing a delay in there to let it finish, tried using ifs and timechecks but still only completes one and one only.

 

Looks like i'm going to have to write a queing function to only allow the 2nd one to process after the first has finished somehow

 

Bugger :(

but if you use a mouseOver call it should process both before I would have thought! though I can't check without the code :) if it doesn't, ignore me!

 

your delay sounds like an odd solution, that's all!

ah i just re-read what you wrote! hmm, my suggestion will be a big pile of *****cks :D

 

write the second function into the first then just call the first!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Important Information

Terms of Use

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.