Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
Victor
New Member
New Member



Joined: Feb 17, 2004
Posts: 15

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

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

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







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

Yes, then it doesn't link at all. The submit button does nothing.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

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

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
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©