onlyican Posted March 26, 2007 Share Posted March 26, 2007 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. Quote Link to comment Share on other sites More sharing options...
Stickybomb Posted March 26, 2007 Share Posted March 26, 2007 does your server have php capabilities if so then i would suggest writing it in php, alot easier to pass variables back and forth between pages. As far as i know and i am no expert the ony way to do this is with server side scripting such as php. Quote Link to comment Share on other sites More sharing options...
BlackenedSky Posted March 28, 2007 Share Posted March 28, 2007 I agree, use php, or look into using xmlHttpRequests Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.