Ah ha ha ha.... I spoke too soon.
IE displays the images fine, which was the original problem... the first "onclick" that I call (clicking an image to show full size) works, but raising any event handlers after that will .. get this .. completely hang the IE window..... no errors, no "infinite loop cancel script" prompt... nothing. Just [Not Responding].
I'll post more when I figure it out......
User Profile
Collapse
-
-
AW hell yea! I got it!
The order of execution I was using:
1) "load Gallery": init the form, loading each image -- which leads to:
2) "image preLoad": create image element & set all properties, including src -- this also sets the "onload" function handler to eventually handle the height/width & finally appends the image to form
4) image loads and the onload handler...Leave a comment:
-
Noooooo IE fails me miserably again.
So, when one is trying to do DOM manipulation between new windows, any elements created must be created in that context.... otherwise IE will raise the most obscure error I have ever seen: "No Such Interface Supported".
[code=javascript]
// open up a new window...
var a = window.open("ab out:blank", "a");
// create an element...Leave a comment:
-
The site you are attempting to access is temporarily unavailable.
If you are the site owner please contact your system administrator....Leave a comment:
-
try vbscript, using the COM object for handling excel files.... what is it .... createObject("M icrosoft.Excel" ) ? I can't remember....
sum of it is, can't use javascript for something like this due to javascript's inability to save to the client's filesystem...Leave a comment:
-
ah the beauty if the if/else statement. I think your polish language statement might be getting in the way..... you're basically saying if the email is invalid, set it to red, check the language & give the user a message... then set it back to black. it does all this in the blind of an eye.
Also, a message from a potential user filling out your form: "if i made a mistake on my email, I don't want to have it replaced...Leave a comment:
-
The short answer is you can't... I imagine you want something like,
[code=javascript]
var myDate = new Date()
specialFormat = myDate.mysterio usMissingFuncti on("yyyy-mm-dd")
// returns 2008-02-26
[/code]
Some may say the holy grail of javascript is event handling... I disagree, date handling is way harder.... the good news there's lots of people out there with the same or a similar problem.......Leave a comment:
-
document.createElement("IMG") vs new Image()
Alright, so generally I'm using document.create Element("IMG"). ... but, I've noticed something just recently that made me switch to "new Image()"
What I'm doing is creating a photo gallery of sorts, where i basically want to supply a total # of images, rows/cols max thumb/full image and let the script do the work. The solution I've opted for is to load the images once and change their size / position / visibility... -
Hey thanks acoder! Here I didn't even know what they were ... One section in particular very much applied to my post, Closures 1.3: Creating closures in loops: A common mistake
So when I say,
[code=javascript]
that.init = function() {
...
}
[/code]
This creates a closure called init ... this includes the environment of the init function, where the variable "x" is defined.......Leave a comment:
-
NaN means: Not a Number -- generally raised if you divide by zero or square route of -1, things like that.... in this case, if you forgot () on the function calls, that would do it.... or if the date is invalid, that woluld do it.... try and alert( server_time ) -- if it returns "Invalid Date", there's your problem.
Mark raises some very good points... but, it's really not all that complicated to use the build in javascript...Leave a comment:
-
Hm..
[html]
<script type="text/javascript" src="externalFi le.js"></script>
<script type="text/javascript"> footerLinks(); </script>
[/html]
is that what you're trying to do? I don't think I've ever seen a src="javascript :functionCall() " inside a script tag.... I'm surprised IE does anything there.Leave a comment:
-
[code=javascript]
var inputText = document.create Element("INPUT" ); inputText.type= "text"
[/code]Leave a comment:
-
PHP Forum? If so, probably way easier to do on the server-side of things. if you wanted to do it with javascript ... creating the image is simple enough, do this in global scope:
[code=javascript]
newImage = document.create Element("IMG");
newImage.src = "new.png"; newImage.border ="0"
[/code]
but then where to put it's clones? you'd have to first, find elements where...Leave a comment:
-
Hmmmm.... Generally you use javascript in PDF forms to show calculations.
validation is generally handled seperatly...... ... I use "Adobe Designer" to create forms and under "Properties ", "Object", "Value" there's a drop drown for "type" of which lists, "User Entered-Optional [default]", "User Entered-Recommended", "User Entered-Required"... setting it...Leave a comment:
-
I do reckon... not sure if there's any advantage. Actually when dealing with huge amounts of data, innerHTML is faster.... The only real advantage comes when you need to reuse the elements from around different javascript functions -- you just need to declare it once and manipulate, instead of doing a 'getElementById (_id).innerHTML = "" to change..... oh, that and you avoid using a proprietary html property.... and when people look at...Leave a comment:
-
Forgiven!
You're talking server-side scripting -- like ASP or PHP? Or is this more of like a batch program to roll up a database into static html files?
Please elaborate on "tab display"
target is generally used with framesets -- if you have multiple frames, setting the "target" on an anchor will make the link open up in that frame......Leave a comment:
-
it's really hard to tell without knowledge of what "editor_display ing_text" is.
I'm going to go on a limb and say not all elements have a property called "value"... in fact, most do not. Unless "editor_display ing_text" is an "OBJECT", "PARAM", "LI", "INPUT" or "BUTTON", value will return undefined.
Read the DTD: http://www.w3.org/TR/html/DTD/xhtml1-transitional.dt d,...Leave a comment:
-
Correct! Valid constructors for date are:
[code=javascript]
new Date(); // right now
new Date(millisecon ds) // # of milliseconds since 01/01/70 00:00:00
new Date(dateString ) // a string that represents the date in a format that is recognized by the Date.parse method
new Date(yr_num, mo_num, day_num [, hr_num, min_num, sec_num, ms_num])
[/code]
You can probably put what you have in...Leave a comment:
-
Riddle me this: Creating DOM elements in a for loop and attaching events
What a pain. I just pressed "Preview Post" only to find that the server forgot who I was and killed my input. So, where once I had everything described really nice, now I'm just going to write my code and assume everyone is intelligent enough to figure it out:
[html]
<html>
<body onLoad="init(); ">
<div id="b"></div>
</body>
</html>...
No activity results to display
Show More
Leave a comment: