Hopefully this is simple. For the following code:
var Item = /157210/;
The 157210 is an id from our database for a product. If I wanted the code above to have multiple id's such as 157210-157290 how could I modify that code to make this work?
Thanks,
Bryan
Yeah I was trying to do both in the same call function. Basically having both replacements in the same function for '&' to 'and' and '@' to 'at'. Does that make sense?
I have the current code for a text field that automatically replaces an "&" for "and" if someone types it in the field. Is there a way to add additional characters such as "@" for "at":
The current code is:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function replaceChars(entry) {
out = "&"; //...
Below is part of the javascipt:
<script>
function look_$data[computer.id](s){
When the actual search is done from the website the function results looks like this:
<script>
function look_Dell|Optiplex(s){
How do remove the character "|" from the function results so it looks like this...
When I use the following script (automatic browser refresh) it pops up a message saying "Retry". Is there a way to disable this pop up box and resend the information automatically?
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if...
Well the problem is that there are thousands of combinations for /Dell/. Is there a substiution expression for it to understand /Dell|any-other-combination/?
The script below is just a small section of the script but what I wanted was to know is how to make the /Dell/; also equal to other values such as /Dell|Optiplex/; and /Dell|Dimensions/; etc:
<script>
function look_$data[computer.id](s){
var regex = /Dell/;
if (regex.test(s)) {
var look = 1...
Is there a way to stop the following javascript from giving a stack error? Also the onclick="bookNow('airlines.id%3D$data[airlines.id]') cannot change.
<script>
function bookNow(s) {
if ( s.match('Delta') ) {
bookNow(s);
} else {
alert('call us');
}
}
</script>...
Excellent script! The only thing I see is this:
1. dispatch needs to be orderNow for example:
onclick="orderNow('computers.id%3D$data[computers.id]');
2. The alert was on 'Dell' and what I needed was the alert to be on everything else but 'Dell'
Thanks for the assistance so far!
For some reason it does not popup an alert box saying 'call us' and the URL only shows a # sign and does not insert the data in the actual URL. Seems to be closer though :)
In the java code below is there a way that if someone clicks on the 'Order Now' link it pops up and alert saying "Please call us to order." if only the following happens:
1. The data in the hyperlink is not "Dell"
The java code is: <A...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.