HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 15th, 2004, 06:32 AM
cs48264 cs48264 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 cs48264 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to call call a web page from a form button

Hi there,

I have a list box with dates in yyyymmdd format and a button on the form. When I select
one of the dates and click the button, I want it to load a webpage in a new window but
using the yyyymmdd selected to form the url.

Can anyone help? Do I use onclick="..."

Much appreciated.

Chee...

Reply With Quote
  #2  
Old May 19th, 2004, 11:36 AM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
Try this example. I'm using google's domain with the date at the end of the URL which of course leads to a dead link but you'll get the idea.

Code:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
<!--
function goToURL(dateVal) {
	NewWin=window.open("",'newWin','toolbar=yes,location=yes,status=yes,men  ubar=yes,scrollbars=yes,resizable=yes');
    NewWin.location.href = "http://www.google.com/" + dateVal;
}
//-->
</script>
</head>

<body>
<form name="myForm" method="post" action="" onsubmit="goToURL(this.dateDropdown.value)">
  <p>
    <select name="dateDropdown">
      <option value="20040519">May 19, 2004</option>
    </select>
</p>
  <p>
    <input name="Submit" type="submit" value="Submit">
</p>
</form>
</body>
</html>
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.


Reply With Quote
  #3  
Old May 21st, 2004, 12:16 PM
cs48264 cs48264 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 cs48264 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
many thanks to you this works a treat and it also gets me started in

javascript.

thanks again, you've been a great help

chee...

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > How to call call a web page from a form button


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT