Jump to content

Javascript issue in Firefox 18


Recommended Posts

I'm having some issues with Javascript in Firefox 18.0.2, the script works perfectly well in IE7. But fails to fire or report any issues in Firefox Web console. I've searched the internet and tried a few things. An example of the many scripts that doesn't work is pasted below.

If anyone can help me on this you will save my sanity.

Appologies in advance for the lack of commenting it's one of my many weak points.

document.getElementById('InsertRecordflow').onfocus = function(){

var x = document.getElementsByName('InsertRecordPlant_Id')[0].value;

//var auto = document.getElementById('InsertRecordDocNo').value;

Thank you in advance

Simon

var d = new Date();

var curr_date = d.getDate();

var curr_month = d.getMonth() + 1; //months are zero based

var curr_year = d.getFullYear()+"";

var curr_year_split = curr_year.substring(2,4)

var joint = curr_year_split + curr_month + curr_date;

document.getElementById('InsertRecordYear').value =

curr_year;

//var IntegerCount = parseInt(auto)+1;

//var StringCount = IntegerCount + "";

// Assemble and populate PUS No

document.getElementById('InsertRecordDocNo').value = x + joint + "-";

// Retrieve route prefix

var routeprefix = document.getElementById('InsertRecordroute').value

// Retrieve route suffix

var routesuffix = document.getElementById('InsertRecordsuffix').value

// Populate Full Route Field

document.getElementById('InsertRecordFull_Route').value = routeprefix + routesuffix ;

// Populate Full Routes Field

document.getElementById('InsertRecordFull_Routes').value = routeprefix + routesuffix ;

document.getElementById('InsertRecordYear').value =curr_year;

};

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...