javascript

HTML Javascript toggle visibility of 'select' ie dropdown?

I've created a dropdown and label and surrounded them within a div, however, when i get the div in the following function, it doesnt hide/unhide the label and dropdown?? function ToggleDiv(DivID) { if (document.getElementById(DivID).style.display == "none") { document.getElementById(DivID).style.display = "block"; } ...

Handling ActiveX events in JS

So, I am trying to handle activeX events in the JS. I established a connection and I am firing an event in ActiveX using PDispatch->Invoke method. It just seems like my JS is not recognizing an event. And on the function Add::OnTalk() line it gives me warning about :: Anyone came across similar problem? ATL 8.0 test page for object...

validate form before submitting (more complicated than checking for empty fields)

i have a form containing inputs for times (specifically, an opening and closing time). when the submit button is pressed, it goes to a php page where these inputs are added to a database. i want to check a few things before allowing the form to submit. for example, i want to make sure that the start time is earlier than (less than) the e...

Javascript differences between Mobile Safari and Safari on Mac?

Hey this question is pretty general, but I'm wondering what the Javascript differences are in Mobile Safari and Safari for Mac. I was under the impression that from a Javascript perspective they are the same, with only some differences in CSS/rendering. But I am experiencing a number of Javascript errors in Mobile Safari that don't exi...

Display search results dynamically as typing

Hi Guys, I am trying to build a SharePoint 2007 web part in Visual Studio. This web part should search a sharepoint list and display the results. What I want to accomplish is to display the results as soon as the user stops typing, so no clicking button involved. Probably, a combination of text_changed event and onkeydown javascript? ...

Excel Spreadsheet to HTML Chart dynamically

I have an excel spreadsheet that is going to be updated monthly and then displayed on a Blackberry browser. I've already created a website that has all the spreadsheet information in their statically and uses HTML definition lists and CSS to create charts. I'm looking for a way to load a new spreadsheet into the server each month and...

Redirecting to Secure Mobile Site

I have this .NET website, with an SSL. But when I try to see the Blackberry version of this site, the following message appears on my blackberry screen. "HTTP ERROR 403 FORBIDDEN" "You're not authorized to view this page. Please try loading a different page". It gives you two options then: "OK" and "DETAILS" Once I click on "Details" i...

Pretty-printing a datetime as a day of the week plus time in jQuery/JavaScript

Hi guys, I'm looking for a (ideally jQuery plugin) Javascript library that will let me provide datetimes formatted in whatever standard format (ISO 8601 seems to be the most commonly used among libraries that do something similar, like timeago and Prettydate), and have them transformed into strings like: Wednesday, 5:00pm Tomorrow, 9:...

window.open create reference to the name based

This way I get the reference to the open window: var refWin = window.open("mypage1", "name_mypage"); if you want to close the window, I close with: refWin.close(); if I do a screen refresh (F5) and run the same line, it opens in the same window, because I put the same name. var refWin = window.open("mypage2", "name_mypage"); but...

How to store the form data in a MULTIPAGE form

I am trying to develop a registration page which involves three seperate information. First Page will get contact details Second page - working details third page - study details. How to keep the form data of the previous pages before posting the form?. Plz help any help will be appreciated ...

How to insert dynamic HTML from a URL using Javascript ?

Hi there, I want to be able to include a dynamic chunk of HTML in a page using javascript. I wrote a servlet which returns a chunk of HTML, http://mydomain.com/dynamic.jsp It produces some HTML ( minus head, body tags ) like this: <div> Current Weather : 89F </div> How can I get that dynamic chunk of HTML into the page using ...

Cross-domain requests with JQuery using YQL

So I need to make a a cross domain request where the response is not JSON formatted, so I cannot use .getJSON. .get obviously doesn't work because it is a cross domain request. I came across this (Read this) when I was googling and it seems it should work for what I want to do (which is do a cross domain call that isn't json formatted ...

Unbind event that was binded with .live() jQuery

I have the following code: $('#form1').live('submit.check', function() { //code... }); Now when I try the following: $('#form1').unbind('submit.check'); that event it still bound to the form. Is it not possible to unbind an event the that used .live() to bind it? ...

How to clear content in the update panel on dropdown selection change?

<updatepanel1 >some conent</updatepanel1> <updatepanel2 > Dropdown </updatepanel2> I have a dropdown in update panel2, which gets some data from the database on the selection index change. Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler); function endRequestHandler() { $('select').c...

history.go(-1) going back doesnt work in Chrome

href="#" onclick="closeOrCancel() and history.go(-1) in that js method doesnt work in Chrome (neither history.back()) It works with href="javascript:closeOrCancel()" , but Opera doesn't allow href="javascript:... How to make history go back using onclick= "myFunction()" ? Edit: closeOrCancel() returns false ...

Printing web pages in an order

hi! I've a php file which'll run a SQL script and fetch information about users. Some user's information may span 2 or 3 pages while some might end in just 1. I want to print the beginning of ever user's report in a new page. All these process has to be automated because there are some 400 users, and the client can't select page layou...

.submit() called through javascript not working.

I was having trouble determining what was cause my form to not submit when I called $('#form').submit(); through javascript (but submitted fine when I clicked on the submit button). So I add this piece of code for testing: $('#form').live('submit', function() { alert('submitting form'); return true; }); Now when I click th...

Dynamic multiple location form submit with javascript

Hey guys, I'm trying to write some JavaScript for my website that will select all the forms on a page, add an event listener for when they are submitted, and then route the values submitted to the main action page and an additional alternate page. Here's what I have so far: Send.php: <script type="text/javascript"> function po...

SWFAddress 2.4 in Webkit: problem when setting value to empty string to a page with base.

We recently upgraded the SWFAddress version from 2.2 to 2.4 in our Flex project. Our Flex project consist in a main application with several sections inside, and that's where SWFAddress acts. Each section has a URL slug, so when you click a section the URL Address goes to "#sectionX", and when you return to the home section the URL Addre...

Regex for validation

Hi can anyone tell me how to write a regex for the following scenario. The input should only be numbers or -(hyphen) or ,(comma). The input can be given as any of the following 23 23,26 1-23 1-23,24 24,25-56,58-40,45 Also when numbers is given in a range, the second number should be greater than the first one. 23-1 should not be all...