ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 29th, 2003, 02:09 AM
pgokcen pgokcen is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 44 pgokcen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 29 sec
Reputation Power: 16
<select> option problem

Hi;


I have a asp page called DocumentationPage.asp
I have option buttons here they are the project names.
Users select a project here and view its documents etc....

The problem is after viewing the documents when coming back to DocumentationPage.asp,the selected project is set deselected how can I achieve this problem.I tried using a variable(passing through querystring)
but within <script>....</script> tags I can not be able to use that variable

<%

dim projectname=request.querystring("Project")
if projectname <>"" then %>
<script>
var i;
i=0;
while(i<document.Projects.pn.length){
if(document.Projects.pn[i].value=</script><% & projectname & %><script>){
}
i=i+1;
}
</script>

There is also another error ;
when this vbscript is running there is no radio buttons yet !!

Can you please help me??

Reply With Quote
  #2  
Old August 29th, 2003, 11:30 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 17
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
you could do the following in your form; doing everything server-side
Code:
<%
Dim projectName = Request.QueryString("project")

'create your option buttons, I assume you use a recordset
Do While Not oRs.EOF
  Response.Write "<input type=""radio"" name=""pn"" value=""" & oRs("projectName") & """
   If Trim(projectName) = Trim(oRs("projectName")) Then Response.Write " checked"

  Response.Write ">" & oRs("projectName") & "<br>"

  oRs.MoveNext
Loop
oRs.Close%>

This way you check the radio button which matches the querystring. And since this is all done server side, the form will just come up with the radio button selected.

Hope this helps
__________________
- Rogier Doekes

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > <select> option problem


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap