Welcome to WebmasterWorld Guest from 54.226.194.180

Forum Moderators: open

Message Too Old, No Replies

JS link how do i write it?

need to open a pop up window how do i write it for thisparticular task

     

Oslo2004

2:54 am on Sep 14, 2004 (gmt 0)

10+ Year Member



Hi there i am trying to get a banks pop up window to come up and i have the javascript from the bank but how do i code the "pay now" button so that it brings up the banks pop up window?

This is the javascript:

function gotopay(sDescription, sEmail, sUniqueID, iAmount) {
// New Window options
sResize = 'yes';
sToolbar = 'no';
sScrollbars='yes';
iWidth = 680;
iHeight = 560;
sSite = 'https://www.ipg.stgeorge.com.au/servlet/webpay.website.Simple';
sClientID = 'clientid=<... put your CLIENTID here ...>';
sURL = sSite + '?' + sClientID + '&description=' + sDescription + '&invoice=' + sUniqueID + '&amount=' +
iAmount + '&email=' + sEmail + '&t=1';
//alert(sURL);
window.open(sURL,'','resizable=' + sResize + ',toolbar=' + sToolbar + ',scrollbars=' + sScrollbars + ',width='
+ iWidth +',height=' + iHeight);

So where i want the hyperlink i write what?

<a href="function.gotopay?>

Thanks any help would be much appreciated.

Enrico

Rambo Tribble

3:24 am on Sep 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use the javascript pseudo-URL, as in <a href="javascript:gotopay();"></a>, but that will expose you to scorn and derision within the confines of this forum. The preferred method, despite its verbosity, is <a href="#" onclick="gotopay(); return false;"></a>. Note that you will need to include the values for your variables (sDescription, sEmail, sUniqueID, iAmount) between the function calls' parentheses, separated by commas, something like: onclick="gotopay('stuff','whosit@wheresit.zap','who123',200);"

Note that the single quotes are not needed around a numeric value, but are required for character strings.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month