How to show one form?

http://cheaphotfare.com/index.php

By the way, it is working fine on the above link which is my customer's old site and I am making new Website in ASP.NET for him.

By default, Roundtrip is selected and appropriate FORM is shown.
When other option is clicked, other FORM is show at exactly same position and previous FORM is hidden.

How do I do this in ASP.NET?

Thanks,
Ashok
LVL 13
AshokAsked:
Who is Participating?
 
Michael701Connect With a Mentor Commented:
It has nothing to do with PHP or ASP (these are both server side languages), it's javascript (which is client side)

On the radio buttons use on click to call a javascript function

function select_oneway()
{
  document.getElementById('round_trip').style.display = 'hidden';
}

function select_roundtrip()
{
  document.getElementById('round_trip').style.display = 'visible';
}

PS: use names that make sense, not the existing div1, div2, div3 junk.
0
 
AshokAuthor Commented:
so 'round_trip' would be the id for <div>, right?

Thanks
Ashok
0
 
AshokAuthor Commented:
My new project is in ASP.
Old project is in PHP.

But you are right about clients side JavaScript.

Thanks,
Ashok
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Michael701Commented:
Yes, you'd have the html
<div id='round_trip'>
then the html for the return trip fields
</div>
0
 
AshokAuthor Commented:
One more question.

Would all the divs would be one after another vertically placed (at design time in VS 2010)?

and

if I have 4 divs
when, where (apsx/aspx.cs/Javascript/which event/which property/html) and how would I make 3 hidden to start with?

An example code would greatly help.

Thanks,
Ashok
0
 
Michael701Connect With a Mentor Commented:
Yes you can have the divs on after another.

You can setup a css class called 'hidden' and assign it to those divs in the original html.
0
 
AshokAuthor Commented:
Thanks a lot.

I can manage it now.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.