/    Sign up×
Community /Pin to ProfileBookmark

OnClick URL Help

Hi, I was looking for a bit of help regarding the following code;

[code=php]<script type=”text/javascript” language=”JavaScript”>
<!–

function goThere(url){
window.location.href = url;
}

//–>
</script>

<table height=”28″>
<tr>
<td>
<b><?php echo $view[‘title’]; ?></b>
</td>
</tr>
</table><br />
<table width=”550″ border=”0″>
<tr>
<td>

<?php $lang->xprint(‘str_no_items_in_cart’) ?>
<br/><br/><br/>

<form action=”” method=”post”>
<input type=”button” onclick=”javascript:goThere(‘<?php echo $continueShoppingURL?>’);” value=”<?php $lang->xprint(‘btn_continue_shopping’) ?>” />
</form>
<br/><br/><br/>

</td>
</tr>
</table>
<br />[/code]

I was just wondering where the URL is written in function, how do i determine what URL this points or how could i change this?

Please help.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@NedalsMay 23.2007 — When the 'goThere' function is used, the url is parsed into the function.

<i>
</i>function goThere(url){
window.location.href = url;
}


Here the url is set by '$continueShoppingURL'; a PHP variable.
<i>
</i>&lt;input type="button" onclick="goThere('&lt;?php echo $continueShoppingURL?&gt;');".....&gt;
Copy linkTweet thisAlerts:
@aftabn10authorMay 23.2007 — Thanks for that.

Im guessing the php variable will have to be stored in one of the other files and i should be able to edit the URL?
Copy linkTweet thisAlerts:
@NedalsMay 23.2007 — Somewhere on the SEVER you are have a .PHP file that sets the value of $continueShoppingURL. You will need to find out how the PHP program set the value.
×

Success!

Help @aftabn10 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...