PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Victor
New Member
New Member


Joined: Feb 17, 2004
Posts: 15

PostPosted: Tue Feb 17, 2004 5:39 pm Reply with quote Back to top

I am trying to create a Quick Links block to go directly to content/pages on a site. I have modified another block that uses a drop down menu to pick the page and then click a button to go to that page.

The problem is that the page opens in a new window and I want it to open in the current window.

How do I modify this code to get the it to open in the same window?


$content .= "</select><br><br><center>";
$content .= "<input style=\"font-size:10px;color:#000000;font-family:Arial;background-color:#DCDCDC;\" type=\"button\" onClick=\"window.open(document.form1.menu.options[document.form1.menu.selectedIndex].value);\" value=\"Submit\">";
$content .= "</center></form></center>";
?>


Thanks

Vic
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Tue Feb 17, 2004 9:03 pm Reply with quote Back to top

Have you tried removing window.open
View user's profile Send private message Visit poster's website
Victor
New Member
New Member


Joined: Feb 17, 2004
Posts: 15

PostPosted: Tue Feb 17, 2004 10:16 pm Reply with quote Back to top

Yes, then it doesn't link at all. The submit button does nothing.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Feb 18, 2004 12:23 am Reply with quote Back to top

First off, I would use links, not buttons. Then, you will want your anchor tag to point to something like
Code:
<a href="/modules.php?name=Content&pa=list_pages_categories&cid=1">Link1</a>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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 vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum