Jump to content

How would i do this.


onlyican

Recommended Posts

Hello

 

I am building something which has a floorplan and allows users to click on the floorplan to purhase seats.

 

That part is not the problem.

We had a problem that if ther are more than 45 Columns in the floorplan, then it is too wide to fit the website.

 

Instead of making the website larger, what we decided to do is

Check the number of Columns

If its too wide, then show a pop up link, for the End user to click on and see the floorplan.

 

NOW, my problem.

 

I need to know what seats the user clicks on

Currently I have a link, which passes the SeatID into Javascript, which in return, writes this to a hidden field in the form

 

something like

<Start JavascriptTag>
function BookSeat(SeatID){
var CurrentBookedSeats = "";
var UpdatedBookedSeats = "";
CurrentBookedSeats = document.getElementById('MyHiddenField').value;
UpdatedBookedSeats = CurrentBookedSeats + SeatID+"_";
document.getElementById('MyHiddenField').value = UpdatedBookedSeats;

}

</end javascript tag>

<a href='#' onclick='BookSeat('A1'); return false'><img src='seat_img.gif'></a>

 

Now, please dont comment on this code, it is an example, and the actual code is a bit more complex, as I swap images, have multiple type of images, and also allow a Clear Image.

 

My problem now is, as the Floor PLan is a POP UP, not same page, the document.getElementById dont work no more.

 

Is there a way I can write to the form on the other page, OR

Have a new form on this pop up, and when they close the window, it can complete the hidden fields on the original form.

 

Or any other ideas.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.