I have some scripts that uses activex objects for InternetExplorer to get the browser handle.i get the handle of the newly create browser into IE variable and from there I was making my script work on the browser.In IE6, IE7, IE8 browser this works perfectly fine.How ever, recently I have upgraded my IE6 browser to IE8 since then my scripts are not working as expected.Is there any way in javascript to get the handle over the browser with full access.
Filename is just the extensionless web page name e.g. "Addresses"
Problem is of course every window popped up will replace the previously popped up window and in the case of a popped up window popping up a window the new window will just replace the calling window.
(Please, no lectures on popping up windows, I need to in my particular case and here I'm just stripping it down to the bare problem for claritie and simplicities s sake)
I'd be happy if I could create a new window handle each time so that all my popup windows will be unique. If it could be the filename that would be fine e.g. instead of the window handle variable being "LinkWindow" it would be "Addresses". Is there some way of making the variable I assign the new window to a variable? All I can come up with is somehow having LinkWindow an array of window handles and just keep incrementing it e.g.
LinkWindow[100]; // 100 is more than enough windows for a typical session LinkWindowCount = 0;
I have found out that doing a window.resizeTo(w,h) does not resize the client area tot his size, but the entire window (including tool bars etc).
So, with an address bar, a tool bar and a status bar etc showing, the window.document.body.offsetHeight value will be ~200 points smaller than the required size.
We have a simple set of data in a table, but it can resize based on a font size. On change of font from a combo we call a resize function.
How can I ensure that the body.offsetHeight and widths are enough to show all of my table, without hard coding for toolbars etc (Because they may not be there on some browsers.)
Is there a way like in java to *pack* the client area to best fit?
how to handle window close event in all aspects? i.e. when window is closed using close button alt+f4 and closing the window by right clicking on the task bar
HI'm working on a website and i was asked to add a fancy fade in effect which after a ton of scourcing the web i managed to find and get to work
function fadein(){var fade=0, fadein=document.getElementById("Astuces").style,ms=(fadein.opacity==0)?0:1, pace=setInterval(Fade,30);[code]....
Now for the index page there are multiple images that i want to have fade in one after another. What i did was copy the above code a 5 times and change the function names. It worked like a charm in both Chrome and Firefox however IE as usual is being a partypooper. it appears that IE does can not handle multiple "window.onload" which causes only the first image to slowly fade in.Here is my current code, how can i make it IE competable?
function fadein(){var fade=0, fadein=document.getElementById("Astuces").style,ms=(fadein.opacity==0)?0:1, pace=setInterval(Fade,30);[code]....
I'm looking to kick off a few javascript commands to prepare a document for being printed, but I really do not want to use a button that calls a document.print(); just because, well, people in general dont print using those.
Is is possible to execute javascript when a user choses to "print" the document? ( and also when the printing is complete)?
I am trying to create a handle to an iframe, but the script only gets to a certain point and then fails. I am new to JavaScript, and I have tried everything I can think of, but I just can't seem to figure it out.
Below is the script with some comments so you can see what's happening.
var tmp_id = document.getElementById("BROWSER"); // tmp_id = [object HTMLIFrameElement]
var f_browser = tmp_id.contentDocument; // f_browser = [object HTMLDocument]
Could anyone explain what I am doing wrong. I have used this method after seeing several examples online, although to be honest, I don't understand what it's doing (or not doing) 100%.
I was developing a very simple application, just for training some Ajax. It works like that:
» I make a search using Ajax and it gives me a list with a lot of cities according to their state;
» After receiving the data, I can only manipulate the first DIV (that contains the city data).
The problem is that the city boxes (DIVs) has the same ID and, when the jQuery function is set (to send the address to an input that will make a search through Google Maps API), it only works for the first DIV. Then, if I search new cities, it works, but the same manner :(
Check out the screenshots:
[url]
[url]
[url]
[url]
So... I can only handle the first DIV among all the anothers, because they have the same ID. I have already tried the .each(), .unique(), creating an array...
Via AJAX i am requesting certain informaiton. The script either returns the content as html or in case of an error returns JSON (error number and description).
How can i fix the success message to cater for both?
I started developing a website that for many aspects should be similar to a Flash website but of course only in JS. What a challenge! An important part, of course, should be the managing of the position of the objects and to do so I need at least to be able to get all the properties from them, also if they have dynamic content. The very simple issue I'm stuck at the moment is to get the width of a div that contain a text, to place at its right the next div. I have very different behaviors in IE and Mozilla when I move a DIV. In fact given this structure:
I would like an event to fire every time text changes inside <input type="text" /> element. Meaning a user types in a letter, and the even fires immediately. Is .change the wrong thing? Because it seems to fire every time the focus is lost, or gained and the text has been changed. Is there anything that can run as soon as any letter is added/removed from input text?
I would like to remove "hidden" to class value which class valuestarts with "nc1"I tried the following jquery code, but it doesn't work.$(.nc1).removeClass('hidden')
but there is still problem i faced that i want only headlines not whole page i think it can be get by open popwindow or else any one can tell me how to handle mapping if i want to show only one in javascipt.
every time a window is opened in our software , I built a function to get the win32 handle address for each object inside this window ,by its string name (this is something that remains unchanged). now,after opening the window in real time , and running the function, I have some value like this for example: 0x00b206d8. my question is , how cand I use this handle value in order to do some actions on this object- for example insert a value and etc... I need the correct syntax in order to do so ,
I'm trying to make use of XMLHTTP object, but I've come across a problem. It seems that there is no way to create dynamic array of such XMLHTTP objects (to make several requests) and handle them properly. I was trying to use such code: