dhtml

input type text and onKeyDown not working under IE

大憨熊 提交于 2019-12-12 01:32:58
问题 I am writing a WWW application, it has to run under IE. I have the problem with the code that runs under FF, but i can't get it running under IE. // JS code function test() { if (window.event.keyCode == 13) window.location.assign("myPage.php"); } I've tried some similar ways around window.location and location.href, also document.location. I've read that IE has problems with that, so i ask for a solution. The goal is, that page reloads after typing in some text into <input type='text' name=

Frameset problem in html

橙三吉。 提交于 2019-12-11 17:49:23
问题 I have created a website with multiple no of pages with in a same folder (i mean all those pages are with in a folder). I have developed this design under the frames. I have used 3 frames top for banner, left side for menu and and right side for main page. While clicking the left side menu frame i just navigate the main page into different page. My problem is while clicking the menu, i just change the target of the right side main frame. Is it possible to change the URL while navigating to

How can I disable all buttons and links on my page, but still let the postback occur?

六眼飞鱼酱① 提交于 2019-12-11 16:41:46
问题 I'm trying to prevent the user from clicking on more than one postback-causing element on the page. In other words, if they click the 'continue' submit button, they shouldn't be able to cause another postback before the original request comes back. I've had a go with two versions of jQuery code. Neither does exactly what I want: This version will disable all the postback elements, but in doing so, it stops the clicked element from firing. For the record, I don't think the .removeAttr('onclick

how to overcome IE bug when dynamically attaching div to body from script

浪子不回头ぞ 提交于 2019-12-11 14:58:50
问题 UPDATE: the HTML was not well formed. This was causing the script to appear in inner div. Please ignore the question. IE ver<8 has a known bug (Internet explorer cannot display the page. Operation aborted) If a script tries to append something to upper level block: The bug is described here: Update: I rephrased the question and simplified the example: The bug occurs in the following code: [end of html file] <script type="text/javascript" > if (window.document.body){ var c_div = window

is ID of html controls which called by javascript casesensitive or not

余生颓废 提交于 2019-12-11 05:55:54
问题 i have this control <input id="btnBackMP" type="button" value="<" onclick="BackGroup('MP') ;" disabled="disabled" style="background-color: #BF0000; width: 28px;" /> inside backGroup Function i used this Code Line : document.getElementById('btnback' + Key).disabled = true; this line works fine on Web Dev but when i published my site on server (iis 7) this line stop working till i changed it to the following : document.getElementById('btnBackMP'+ Key).disabled = true; any one have idea ? thanks

InnerHTML with special character is trimming the data

╄→гoц情女王★ 提交于 2019-12-11 05:41:38
问题 InnerHTML with special character is trimming the data. elem.innerHTML = displayedObjects.name; here the displayedObjects.name contains a string like Test&string . The above statement is assigning the value only Test , What could be done here? 回答1: That's because Test&string isn't actually valid HTML, because & is an escape character for an HTML entity. If it were properly encoded, it would be Test&string instead. If you're just trying to set the text of an element, I'd suggest you use

jquery ui sortable propagation dynamically created sortables

天涯浪子 提交于 2019-12-11 02:42:34
问题 I want to have a feature that every time I drag an image from sortable on empty space a new sortable is created. If I store two images in a sortable, than I can drag them and new sortables are really created(gray boxes). Now I would desire to be able to drag an image out of the newly created gray box, so that again a new gray box would be created if I would drop on an empty space. This does not work. How can I propagate my function for uls to dynamically created uls? refresh does not seem to

Embed a Google Maps API Javascript in Flex

百般思念 提交于 2019-12-11 02:27:53
问题 How could I embed a Google Maps API Javascrip on my Flex Application? I found some examples, but none of them worked for me. http://javey.net/bike/map/player5/map.html?gpx=http://javey.net/bike/gpx/24-nov-2007.gpx&title=Sheldon.Road.Trail Can anyone help me with that question? I would really appreciate it. 回答1: What have you tried so far? Do you have any code to show us? Your second link explains using an HTML wrapper in Flex, which seems like a straightforward solution to me. You can make

how do I know if the mouse pointer is on the HTML element?

百般思念 提交于 2019-12-11 02:23:09
问题 I have a timed event I want to behave differently accordingly to what HTML element the mouse pointer is on. Is there a way, assuming I have the HTML element, to know if the mouse pointer is currently on top of it. I am well aware of the onmouseover/onmouseout events and how to use them. I am using JQuery. I am obviously looking for some kind of flag, as I need to check a state and not handle an event. again, I know how to implement this with events. 回答1: I'm not aware of any built-in way to

getElementById doesn't work on a node

血红的双手。 提交于 2019-12-10 16:09:05
问题 In this simple script i get the error "obj.parentNode.getElementById is not a function", and I have no idea, what is wrong. <script type="text/javascript"> function dosomething (obj) { sibling=obj.parentNode.getElementById("2"); alert(sibling.getAttribute("attr")); } </script> <body> <div> <a id="1" onclick="dosomething(this)">1</a> <a id="2" attr="some attribute">2</a> </div> </body> 回答1: .getElementById() is on document , like this: document.getElementById("2"); Since IDs are supposed to be