Click here to Skip to main content

JavaScript

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
Questionpage loading [modified] PinmemberMember 790448220:22 8 Feb '12  
QuestionNeed Help Setting src attribute PinmemberPianoMan5:26 7 Feb '12  
AnswerRe: Need Help Setting src attribute PinmemberDean Oliver6:40 7 Feb '12  
GeneralRe: Need Help Setting src attribute PinmemberPianoMan16:24 7 Feb '12  
GeneralRe: Need Help Setting src attribute PinmemberDean Oliver21:56 7 Feb '12  
AnswerRe: Need Help Setting src attribute Pinmemberjohny1015198118:12 7 Feb '12  
AnswerRe: Need Help Setting src attribute Pinmembertwseitex2:50 19 Feb '12  
(1) Please don't use names of collections for private vars
 
so var images = new Array();
better var arArrayOfImagesObjects=new Array();
 
images is al pre-dfined collection: document.images
 
see http://msdn.microsoft.com/en-us/library/ms537461.aspx
 
(2) To set scr:
 
valueof .src is not same like pure string
 
preload image
 
var imgObjekt1=new Image(); // height and width if you want
imgObjekt1.src='whatYouWant.jpg'; // maybe with path
 
vImg = document.createElement("IMG"); // check pionter !
if(vImg!=null)
{
// append into object (into child of body) // append into collection images automatically
// check pointer of appended object, use e.g. var imgAppendedImgObject
 
if(imgAppendedImgObject!=null)
{imgAppendedImgObject.src=imgObjekt1.src; // will be (now) rendered in body
// don't use setAttribute("src", "images/" + image);
}
}
 
(3) FIRST optimize your code during edit and THEN check errors at run time.
 
to createElement and appendChild
 
check always pointers != null
 
if you use a collection like images check too
 
declare vars inside of function --> local vars
 
declare vars inside of for{} --> declare 1 time outside of for and use inside
 
declare constants like "image1.jpg" outside of function --> use global code e.g. at begin of js-file (easy find and edit in js-file).
QuestionImages Won't display in IE 7 PinmemberPianoMan6:27 5 Feb '12  
AnswerRe: Images Won't display in IE 7 PinmvpRichard MacCutchan23:23 5 Feb '12  
GeneralRe: Images Won't display in IE 7 PinmemberPianoMan4:15 6 Feb '12  
GeneralRe: Images Won't display in IE 7 PinmvpRichard MacCutchan4:30 6 Feb '12  
GeneralRe: Images Won't display in IE 7 - SOLVED PinmemberPianoMan4:43 6 Feb '12  
GeneralRe: Images Won't display in IE 7 - SOLVED PinmvpRichard MacCutchan5:31 6 Feb '12  
AnswerRe: Images Won't display in IE 7 Pinmemberjsc423:41 14 Feb '12  
AnswerRe: Images Won't display in IE 7 Pinmembertwseitex2:59 19 Feb '12  
QuestionProblem with args.isValid in JS [modified] Pinmemberdayakar_dn22:14 1 Feb '12  
AnswerRe: Problem with args.isValid in JS Pinmemberjohny1015198122:36 1 Feb '12  
GeneralRe: Problem with args.isValid in JS Pinmemberdayakar_dn23:03 1 Feb '12  
GeneralRe: Problem with args.isValid in JS Pinmemberjohny1015198123:10 1 Feb '12  
Questionupdate several DIV using javascript with mysql data PinmemberSergio8410:09 30 Jan '12  
AnswerRe: update several DIV using javascript with mysql data Pinmemberjohny1015198119:38 7 Feb '12  
QuestionJQuery.ajax not working PinmemberAli Al Omairi(Abu AlHassan)0:23 30 Jan '12  
AnswerRe: JQuery.ajax not working PinmvpManfred R. Bihy4:21 30 Jan '12  
GeneralRe: JQuery.ajax not working PinmemberAli Al Omairi(Abu AlHassan)5:18 30 Jan '12  
GeneralRe: JQuery.ajax not working PinmvpMark Nischalke5:40 30 Jan '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid