Web Developer Hints



Web Developer Hints

Replace one string with another

desc=Replace (desc,"'","`")

To replace a “ symbol, it is necessary to use FOUR quotes

desc=Replace (desc,””””,"`")

Disallows right clicking on the page

function right(e) {

if (navigator.appName == 'Netscape' &&

(e.which == 3 || e.which == 2))

return false;

else if (navigator.appName == 'Microsoft Internet Explorer' &&

(event.button == 2 || event.button == 3)) {

alert("Sorry, you do not have permission to right click.");

return false;

}

return true;

}

document.onmousedown=right;

if (document.layers) window.captureEvents(Event.MOUSEDOWN);

window.onmousedown=right;

// End -->

Close a Window

Insert into a table

orderin="INSERT INTO Catalog "_

& "(FirstName, LastName, Address1, Address2, City, State, ZipCode, Country, Email,Date)"_

&"VALUES('"&FirstName&"','"&LastName&"','"&Address1&"','"&Address2&"','"&City&"','"&State&"','"&ZipCode&"','"&Country&"','"&Email&"','"&TodaysDate&"')" invendb.Execute(orderin)

Insert into a table with a LOOP and a NULL field

getcoupons="SELECT * FROM Cupons WHERE (CustID = '"&CustID&"') and (Expdate > '"&TodaysDate&"') and (Usedate is null)"

set couponsrs=invendb.Execute(getcoupons)

If couponsrs.eof then

%>

None Available

Available Coupons

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download