Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to hide selectbox in vbscript...

Posted on 2004-04-19
6
Medium Priority
?
329 Views
Last Modified: 2008-03-06
I need to hide a selectbox depending on a cookie value

sub window_OnLoad()
     'I try to set aReflist var earlier...Req.Cookies"cRefList")
 alert aReflist  
    'if Request.Cookies("cRefList") = "1" then
 if aReflist = "1" then
   form1.selRef1.hidden.value = false
 else
   form1.selRef1.hidden.value = true
end if
End Sub

If this can't be done, can a java script read a cookie that was set in vb? What is the syntax for that?

0
Comment
Question by:williamsF1
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10859831

If you are using asp, then do not display the code for selectbox...
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 320 total points
ID: 10859850
If you need to hide you can just say...

form1.selRef1.style.visibility = hidden
0
 

Author Comment

by:williamsF1
ID: 10859871

what do you mean "do not display the code?"....Don't put it as Clientside?  
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:williamsF1
ID: 10860402
form1.selRef1.style.visibility = hidden
doesn't seem to work? Is it ok that it is in the window_onload()
I get my alert box [see above ] and I put your line after the alert.


<select name="selRef1" size="1" class="boldregulartext">


0
 

Author Comment

by:williamsF1
ID: 10860417
got it...added the = "hidden" , needed the qoutes.

So, what did you mean on "do not display the code?"....
0
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10861648
what I mean is if you are using asp,
you can just say,

if flag=1 then
   reponse.write "<input type=checkbox nam=test value=test>"
end if

Here as you see if the condition fails the ceckbox code is not written to the html... or rather is not displayed...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question