Welcome to WebmasterWorld Guest from

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

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

New User

10+ Year Member

joined:Dec 1, 2003
votes: 0

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';
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';
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.


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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2004
votes: 0

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.