Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Two links in One?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

hadi
Starting Member

USA
37 Posts

Posted - 17 April 2002 :  13:42:49  Show Profile
Is it possible to make two links into one:

For example, say you want to link a page so that when you submit something in a form,two browser opens up one new broswer and one being the parent browser.

Like this: <a href=" www.somewhere.com" and "www.opens_in_a_new_broswer.com">
This link opens two links at once</a>

If it possible, could you please show the coding for it?
Thanks!

http://www24.brinkster.com/pointdexter/forum/default.asp

nomad_2k
Junior Member

United Kingdom
173 Posts

Posted - 17 April 2002 :  14:23:34  Show Profile
A little javascript will do the trick, add the following inside the <head></head tags on your page:

<script language="JavaScript" type="text/javascript">
function open2Links(strLink1, strLink2)
{
window.open(strLink2, 'NewPage', 'width=600,height=400');
window.location = strLink1;
}
</script>


Then in your link put:

<a href="javascript: open2Links('http://www.firstpage.com','http://www.secondpage.com');">Some Text</a>


That should do it.


Good things come to those who wait.
http://www.freeasphost.co.uk/evolution/
Go to Top of Page

Aaron S.
Average Member

USA
985 Posts

Posted - 17 April 2002 :  14:50:42  Show Profile  Visit Aaron S.'s Homepage
You could also put the first one in the href like normal, and then add the second to the "onClick" function.


<a href="http://www.snitz.com" onclick="window.open('http://forum.snitz.com/forum');">Snitz</a>


BTW: The code above is in [ code ] but it still made the second link active - and it is parsed wrong.

--Aaron



MySubs Email MOD
MOD to Smile Mgr
HotKeys MOD
Go to Top of Page

hadi
Starting Member

USA
37 Posts

Posted - 17 April 2002 :  15:41:35  Show Profile
Thanks for you promp reply and i have test both of your method and they both work ...

however, i still have a problem. The reason i need such a links was that when a user fills out a form, when they click the submit button ... it takes them to another page thanking them for filling out the form and also opens another browser: so how can i do with the following codes:

<FORM METHOD=POST ACTION="page1.asp" onclick="window.open('page2in_newbrowser.html';" onSubmit="return confirmAction()">

By the Way: I use brinkster.com for my forum and they don't give any mail service for regular members: Is there a way i could get around this and be able to send mail?

Thanx

http://www24.brinkster.com/pointdexter/forum/default.asp
Go to Top of Page

Aaron S.
Average Member

USA
985 Posts

Posted - 17 April 2002 :  15:59:42  Show Profile  Visit Aaron S.'s Homepage
Use the onSubmit:

<FORM METHOD=POST ACTION="page1.asp" onSubmit="return confirmAction()">


At the bottom of the confirmAction() function add:

window.open('page2in_newbrowser.html');


That should do it.

--Aaron




MySubs Email MOD
MOD to Smile Mgr
HotKeys MOD
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07