Javascript Special Operators

I posted this for my reference use. I thought it may be helpful to others too.

Javascript Operators

:

delete Deletes an object, an object’s property, or an element at a specified index in an array. Read some examples of the delete Javascript operator here https://developer.mozilla.org/en/JavaScript/Reference/Operators/Special/in
in Returns true if the property is a property of a specified […]

  • Share

Javascript Detect Browser

Javascript Detect Browser type using Javascript Browser Object navigator:

document.write(“Javascript appName: ” + navigator.appName + “Javascript userAgent” + navigator.userAgent);

Javascript Browser Detect Code:

document.write(“Javascript appName: ” + navigator.appName + “Javascript userAgent” + navigator.userAgent);

Note: ignore the part after the […]

  • Share

Javascript Event Handler

Javascript Event Handler
Results or Outcome

onabort
Image that was loading was interrupted by visitor

onblur
Vistor move mouse away from a form element

onchange
Visitor changed a form element

onclick
Vistior clicked in the designated area (usually a form’s button)

onerror
web browser reported an error when an image was loaded

onfocus
Visitor placed their focus on to a form’s element (clicked on it)

onload
Window document finished loading […]

  • Share

Automatically fill out forms using MySQL, PHP

I want to login to a page and then automatically submit a form. The form’s data is drawn from a MySQL db. I know PHP Curl a bit but I believe it can’t handle javascript or ajax-based forms well. I briefly read about Java’s HTMLUnit and it seems like this can handle ajax created forms […]

  • Share

Javascript AJAX error in IE-unknown runtime error

Javascript AJAX causes unknown runtime error in IE javascript debugger for IE 7.x and 8.x.

I have this code that works perfectly in firefox but IE 7.x and 8.x has a problem:

function revDescr(condition_id, rev_cat_id) {
this.condition_id = condition_id;
this.rev_cat_id = rev_cat_id;

//update the […]

  • Share

Jquery Ajax .load not working

Here is some code using JQuery’s .load:

The following code is not correctly displaying the information though:

function revDescr(condition_id, rev_cat_id) {
this.condition_id = condition_id;
this.rev_cat_id = rev_cat_id;

var pars = ‘condition_id=’+this.condition_id+’&rev_cat_id=’+this.rev_cat_id; //used by jQuery
$(“#reverse_content”).load(“updateRevDescrSi.php?”+pars);
}

Here is the comparable Ajax […]

  • Share