Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View JavaScript Function OnClick

Status
Not open for further replies.

yaknowss

Programmer
Apr 19, 2012
69
0
0
US
Our seat maps are currently designed to take users to a screen where they can select a seat they want and from there, purchase a ticket. Using the same page, I added a query string that is set for users who want to view the seat maps only and not actually purchase a ticket. Here is the query string I created, you will notice the features I want to disable when they are in "ViewOnly Mode":

Code:
Mode = Request.QueryString["Mode"];
if (Mode == "ViewOnly")
SelectPerformanceBlock.Visible = false;
QueueBlock.Visible = false;
MaximumTixBlock.Visible = false;
LegendHeaderBlock.Visible = false;

I want to include a function after users selected their zone, send them to a page that shows the view from their selected seat. This "view from seat" feature is currently enabled on the page but can only be accessed if users manually click the link. The view from seat feature uses an OnClick function and is written in java-script.

My question is how can I enable the "view from seat" function to automatically be displayed when users are in ViewOnly Mode? I've attached my working files. Thank u in advance.
 
You'll need to craft a similar function and call it from your on load.
This uses jQuery, but you could do something similar with .getElementByID.

function forceClientClick() {
var Link = '#myID_' + CurrentID.toString();
$(Link).click();
}

Lodlaiden

You've got questions and source code. We want both!
There's a whole lot of Irish in that one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top