Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Validating pages which contain JavaScript

Featured Replies

Hi again

 

I've just tried to validate a page that I'm working on which validated fine until I used a script provided by DynamicDrive. Now the page won't validate and I don't know how to fix it or even whether I should worry about fixing it?

 

Many thanks

Kerstey

try putting <!-- before the js code (and after the <script type="">, and right at the end of the js add -->

 

or put the js in an external file

  • Author

try putting <!-- before the js code (and after the <script type="">, and right at the end of the js add -->

 

or put the js in an external file

 

The <!-- worked, thank you! :)

  • Author

Now I have a problem with a script which shows a shopping basket on the page - same problem, the page doesn't validate, but it did before I put this script in

 

Quantity: <script language="JavaScript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=1"></script><br/>
Total: <script language="JavaScript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=2"></script>
<form action=http://www.romancart.com/cart.asp method=post>
<input type=hidden name=storeid value='46521'>
<input type=submit value='View Basket'>
</form>

 

Any suggestions on what I should do to make this validate?

Now I have a problem with a script which shows a shopping basket on the page - same problem, the page doesn't validate, but it did before I put this script in

 

Quantity: <script language="JavaScript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=1"></script><br/>
Total: <script language="JavaScript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=2"></script>
<form action=http://www.romancart.com/cart.asp method=post>
<input type=hidden name=storeid value='46521'>
<input type=submit value='View Basket'>
</form>

 

Any suggestions on what I should do to make this validate?

 

 

Quantity: <script language="javascript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=1"></script><br />
Total: <script language="javascript" src="http://www.romancart.com/cartinfo.asp?storeid=4645521&type=2"></script>

<form action="http://www.romancart.com/cart.asp" method="post">
   <input type="hidden" name="storeid" value="465212" />
   <input type="submit" value="View Basket" />
</form>

you should try closing all open code, make sure everything is in common letters, ensure you have them enclosed if they need to be and you should be fine. good luck

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.