hi all

trying to set up an online shop BUT..

cant get javascript to accept "£" so having to use "$" instead..not good for a uk site lol

In a shop, you set the prices in whatever currency is appropriate.

The user should never need to enter a currency symbol and you should never need to read/deltect one in its symbolic "£" "$" form.

If your shop has user-selectable currency modes, and your client-side or server-side code needs to know what currency was selected, then write a coded "currency value" into a hidden form field, eg. USD=1, UKP=2, Rupee=3 etc. Change this value whenever the currency mode is changed. Alternatively, if currency is selected from a <select> menu, then simply read the current (coded) value from the select element; no hidden form field is necessary.

Airshow

hi all

trying to set up an online shop BUT..

cant get javascript to accept "£" so having to use "$" instead..not good for a uk site lol

Use the character entity &pound;.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.