I have a <FORM> with several text based input controls in it, and for some reason, although I have assigned ID values to these control, when I attempt to run any JavaScript error checking on them I get JS Error messages for some reason.
To simplify where I have gone wrong, I have written a simple JS alert message as follows...
I am using the below pre-built script for my mouseover images:
And it works on the page simply by adding the following attribute to the image tag, with the behind being the mouseover image's url. Yes, it works.
But i have an external JS file that writes functions to the page, attached to the page.
There are some switch cases (i can post them in their entirety if you want), but the main purpose is that it changes the html of the DIV with the ID "home".
Note that the image "button/l5b.jpg" shows. But the mouseover effect done with "class=domroll button/l5.jpg" does not.
At first i guessed it could be a file path problem with the image, but later i realise i don't even see the red X that indicates a broken image. So i am guessing that this JS file cannot read another JS file?
The hierarchy of the file is like this:
- index.html - js/chrisdomroll.js (the mouseover class) - js/writefunctions.js (the class i used to write my own functions)
It does not seem to work either when i pasted the whole chunk of javascript from writefunctions.js into index itself.
Also, while the div shows properly in other browsers, it does not show up at all in Safari.
I seem to have come across a weird issue in internet explorer.I've been working on doing regular expressions for a register form, and I've checked it in Firefox, and Chrome and it seems to work for both of them but yet it doesn't work for Internext Explorer 6 - 8.The issue is that the drop down boxes (select fields) dont seem to be recognised for RegEx in I.E. this is causing an issue for me as I want it to work in ALL common web browers as well as keeping the whole form standard.
I've pasted a snippet of code below to show you what I've done.This one below is the original one which just checks if the field entry is blank
function check(theForm) { var checker;[code]...
If you have any Ideas about what I can do to make it work in I.E. I would be most greatful. Also if anyone knows how to do and RegEx on a checkbox that would help me quite a bit too.
Ive got a really simple problem but I can't figure it out. I've got a form named bob with one text box name bobtext with a default value of "http://". When I add onload="document.bob.bobtext.focus()" it focuses on the text box, but at the beginning. Is it possible to focus on the text box, but at the end of "http://"? This seems like something easy so I'm probably making some stupid mistake.
Suppose I have a page, call in parent.html . Inside, there is an iframe, call it child.html . I want it so that in response to a keyboard event in either parent or child, child.html will respond in a particular way.
Do I need to use a different set of code for each html page, or can I reuse the same code?
If the code is different, what are the fundamental differences in code?
How do I make one frame respond to events in a different frame as a general rule?
#display { text-align:right; } </style> <script type="text/javascript"> var find=document.getElementById; var temp=0; var total=0; var which=0; var m=0;
function Mplus() { m=parseFloat(find('display').value) + m; find('memory1').value="M+*"; }
function Mclear() { m=0; find('memory1').value="M+"; }
I'm using XHR to make some REST requests. Right now I need to handle HTTP 401 responses.When a resource is requested such as a Javascript file or CSS file the browser will popup a prompt for username and password, which is normal behaviour.When I make an XHR request for POST,GET or PUT I get an XHR response which includes a status of 401 and no popup from the browser, this is also normal.The problem is when I make a DELETE request, I get the expected XHR response AND also the browser still pops up the username and password prompt.
Does anyone know of a basic Javascript Rich Text Editor that dosen't have too many features. I don't want smily faces or the ability to insert images, only the basic text formatting. All the ones i found on google are packed full of extras i don't need.
im need to create s simple CMS/WYSIWYG, but im not a pro on js. I found one on a website, but i dont want to resort to stealing codes.
basically, theres a textarea, where you put in text, and a button for bold, italics and underline, etc. if i highlight something on the textarea and hit the bold button, the text automatically gets surrounded by the <b></b> tags, or or whatevers convinient. when i look at the inline js code from the button, it calls a function, but id rather simplify the code, it should be something like onclick=insertstyle("b","textarea_name");
I have the source code to an old BASIC program that a friend of mine would like to run online. I am a beginner at JS, but I think that it would be a good choice for the project. My background is in C/C++ and web development.
Any suggestions that might get me off to a good start here? I can provide more information if needed, but I am not sure what would be helpful. The program is 550 lines in what appears to be BASIC and is a calendar conversion program. You give it a date and it will convert it into one of many other date reckoning systems (Gregorian, Hebrew, Egyptian, etc, etc).
I've been looking at all the various image replacement techniques..and they all seem unnecessarily complicated. I came up with:
function replaceLogo() { document.getElementById('header').innerHTML = '<img src="/images/logo-tci.gif" />' } It's just replacing the layer contents at a very basic level.
This works just fine, I'm just wondering how well supported it would be across different browsers. Anyone know of a table of browsers that support innerHTML or see potential cross-browser issues with this technique?
I would like to allow a user to browse his local directories, choose an image (probably .jpeg) file, and upload it to the server (a servlet). The same functionality that online datiing agencies use to let people save their photograph with their profiles. (My application is an online Want Ads.)
I feel that this must be possible within a minimal client (without a JVM) using nothing more than JavaScript, but I'll be damned if I can find how.
Would one of you more experienced JavaScript people please point me in the right direction.
In a nutshell, I'd like to have a list of items, each of which fills out a small table which displays some info about a particular item(the items being a trouble ticket for a tech support ASP-built web-based app). There may be zero, one, or many of these per ticket. Since some tickets have many of these items (call them work items), the page can get awful long. I have this part working already.
So my proposed solution to make the pages shorter would be to have one line for each of these little work items. If you click the text in that one line, it shows what had been a hidden div. If you click it again, it hides it.
Sorry I couldn't find appropriate group for SVG and ECMAScript. Since SVG is in XML format and ECMAScript is very similar to JavaScript. What's why I post in these two groups.
In the O'Reilly SVG book, in chapter 11 Animating and Scripting SVG. It mentions some very basic functions like
var circle = event.getTarget();
var obj = svgDocument.getElementById("idName");
I got error message said these are no a function in Firefox and batik-squiggle.jar
When I used SVGView plug-in (made by Adobe) for IE .
I typed:
var svgObject = evt.target; var svgDoc = svgObject.getOwnerDocument(); var svgElement = svgDoc.getElementById(idName); var svgStyle = svgElement.getStyle(); svgStyle.setProperty('stroke-width', 3);
These lines are working fine for SVGViwe Plug-in by not work for Firefox and batik. They complained that getOwnerDocument is not a function. I tried to change getSVGDocument but no luck.
Is that O'Reilly book too old? Its first editoin is 2002.
How can I make getElementById() working in Firefox and Batik? Is there some examles or some documents?
I'm about to embark on really learning jQuery. The first step of which is to get a basic jquery function to work. Everytime I learn something this way the first thing does not work for no apparent reason. It's probably something obvious but I can't move on without getting this to work. I added jquery to the page I have two things a div called #content-container and an image with class .logo
I'm including jquery.ui.datepicker.css and jquery.ui.all.css versions 1.8.7 in my header, when I click the input box firebug shows the datepicker code is in the source but the ui-helper-hidden-accessible class isn't being removed to display the datepicker. Do I need to update jquery or at least ui.core which is 1.7.2?
After playing with the css files I was able to get the datepicker to open but the prev and next text is being displayed above the prev/next buttons
I've tried every combination I could with these files to get a basic datepicker to open up
I've got the following code block in one of my pages ...
<?php if ($config->theme->short_name == 'default') { ?> <script type="text/javascript">
[Code]...
Shouldn't the code above set the .html property of the element with class "error_box" to the specified text? I've tried using an id instead of a class i.e. $('#error_box").html(...) but that doesn't work either. I've also tried using the .text() method.
Manually using document.getElementById("error_box") works without any problems - it's only jQuery that won't do what I tell it. :-)
A client of mine is trying to integrate one of his Web systems with my system. In an essence, he wants to embed my system's web UI into his "master" web page, and display it in a sub-frame whenever a user requests my system display.My system (JBoss AS) has Basic Authentication enabled. So if a user attempts to access my system he/she is prompted to provide username/password. If correct credentials are provided, then user is allowed access to my system / web pages.Now, the client is trying to automate the login. He wants to provide the login information automatically, through JavaScript in his master page (this is needed so that users of his system don't provide any credentials - all user/pwd information is passed under the curtains).What is wrong in the approach above and do you know if there is a better way to properly implement this seamless logging (knowing that Basic Authentication is the only option)?
I have been trying all morning to put a basic slideshow into my site from the below link[URL]... am pretty new to this and having to host my images on Photobucket as I use Big Cartel. I cannot figure out where to put the image links and do they need -
I'm trying to create a script which allows multiple different tables to be shown on mouseover of an area (in this case, a table cell). However, I want the tables to appear in a long list for those who have JS disabled. For obvious reasons I don't want two copies of the tables in my html, and obviously only want the mouseover section to appear for those with JS enabled.
The basic problems I have so far is that I can't get the div "plaintables" (which contains all the tables) to be hidden when JS is enabled, and when I mouseover (activating scim()), I get the message [object HTMLTableElement] rather than the actual table.
Pretty much just starting out with Javascript, so this is probably something really simple I have done wrong.
Just incase it matters, I don't have access to the contents of the <head> tag (This is for a site with an existing template) - it would be easier if everything could be done in the <body> section.
This basic script works fine in Firefox and Camino, but not in any version of IE or Safari. VerifyOrder() sends the 3 groups of radio buttons to CheckRadioButtons() which checks that each has been selected before sending it on to the server for processing. Is there another way I can write this so it works in all browsers?
I have a basic flash gallery that I embedded into my site (HTML & CSS). When viewed in Firefox everything is fine (840px by 427px), but when viewed in IE the gallery changes size & needs to be (887px by 440px) to be viewed correctly.
So, I put an Javascript If Then Else statement. Now it targets and changes in the IE browser (width='887' height='440') , but it also changes the Firefox one to 887x440 when it should stay the original 840x427.
I have some text that I need to use on multiple pages on my site. I thought it would be easy to have an external .js file and then link itto display om each page I need it. I can create the script (the .js file) but I can't get it to write to the webpage inside the Body tags..