javascript

Extjs Element component load event not firing in Safari or Chrome

Hi, I am creating an Iframe and adding it to the current document and it is being used as a file download target. Here is the code... var dl = Ext.DomHelper.append(document.body, { tag: 'iframe', id:'downloadIframe', frameBorder: 0, width: 0, height: 0, css: 'display:none;visibility:hidden;height:0px;', src:...

Jquery - Validating Email

I do NOT want to use the Jquery attachment to the field. I just want a function I can call and pass in a value and get back a result on if it is a valid email. JQuery documentation seems to indicate this is possible but the documentation falls short on examples outside of attaching it to the field. I realize I can use third-party functi...

Javascript Document.bgColor does not work

Hi, In the below code, I get the two dialog boxes, but the bgColor of the page is never changed. Is there any standard that font / color changes are not honored in JavaScript ? <html> <head> </head> <body bgColor="GRAY"> <script type="text/javascript"> document.write("This message is written by JavaScript"); alert('Am here'); alert('...

Javascript field value lenght

Hi guys, I'm doing something like this: alert(document.getElementById('cardNumber').value); And it alerts cardNumber value. But I need in it's lenght: alert(document.getElementById('cardNumber').value.lenght); undefined Why? ...

How javascript gets someother website data?

Well i am a bit confused.. I saw a service known as Zopim.. What they do is they provide you with a small piece of code: such as <!-- Start of Zopim Live Chat Script --> <script type="text/javascript"> document.write(unescape("%3Cscript src=\'" + document.location.protocol + "//zopim.com/?zopim\' type=\'text/javascript\'%3...

How do I convert some ugly inline javascript into a function?

I've got a form with various inputs that by default have no value. When a user changes one or more of the inputs all values including the blank ones are used in the URL GET string when submitted. So to clean it up I've got some javascript that removes the inputs before submission. It works well enough but I was wondering how to put this...

Is there a javascript function that can pad a string to get to a determined length?

I am in need of a javascript function which can take a value and pad it to a given length (I need spaces, but anything would do). I found this: http://jsfromhell.com/string/pad But I have no idea what the heck it is doing and it doesn't seem to work for me. ...

HTMLUNIT Facebook javascript warning

Hi I am trying to create simple application that would be able to search people on facebook using given e-mail. I am already able to log into an account using the HTMLunit tool and even create a page, which should throw result of my search. But when I try to print the result as XML the file is missing some blocks of javascript results (...

How does the same origin policy apply to IP addresses

I have a server on our company intranet that runs JBoss. I want to send API calls to this server from my machine, also on the intranet, and get the resulting XML responses using JQuery. I read the entry on Wikipedia but am confused how that applies to my situation, since our machines only have IP addresses, not domain names. I have ...

How can I start with <a href=" and have an array element here then end with </a>?

The thing im trying to do right now is pulling in multiple links from a textarea, We can pretend that a user inputs c:\pics\img01.jpg and in the next row he'll have the next imglink. I want to pull those links, I allready have the code for that: var entered = $('#filedir').val(); var lines = entered.split(/\r\n/); var opttext = "...

Setting hidden input value in Javascript, then accessing it in codebehind

I have been trying to set the value of a hidden input by using Javascript and then access the value from within my C# codebehind. When I run the code that is copied below, the value that is assigned to assignedIDs is "", which I assume is the default value for a hidden input. If I manually set the value in the html tag, then assignedIDs ...

Chrome page refresh problem

Pressing enter inside a textbox refreshes the whole page in Google Chrome. please help me out ...

Alternate way for string replace and array

Is there any way to replace titles faster then str_replace function? I've got a file that is 2000 lines of array changes. That hurts my webpage. ...

looking for overview of readystate and browsers

I'm finding a lot of problems with trying to determine readyState between IE8, FF3, and Chrome. so far this is what I find: Chrome, FF do not fire an event for .onReadyStateChanged Chrome, FF support .onLoad IE8 supports .onReadyStateChanged, but does not support .onLoad IE8 has also returned loaded, and complete. Mostly it states loa...

Why can't I get jQuery's live() or load() to work?

Why does only the third method work? $('#jqtest').live('load', function() {$(this).html('hi');}); //1 $('#jqtest').load(function() {$(this).html('hi');}); //2 $(window).load(function() {$('#jqtest').html('hi');}); //3 <div id="jqtest">kldjfglkj</div> ...

Creating an element and insertBefore is not working...

Ok, I've been banging my head up against the wall on this and I have no clue why it isn't creating the element. Maybe something very small that I overlooked here. Basically, there is this Javascript code that is in a PHP document being outputted, like somewhere in the middle of when the page gets loaded, NOW, unfortunately it can't go ...

jQuery question from a person who can't javascript

So I'm trying to adapt this Dropdown menu on Joomla the styles work great as expected so I'll post the javascript includes on the head of my website: <script type='text/javascript' src='js/jquery.js'></script> <script type='text/javascript' src='js/dropdown.js'></script> <script type='text/ja...

How do I store more information in a marker?

Hello, I'm using Google Maps v3 and I build in the server side a json collection of location data. So when I receive that, I iterate through that collection and create a marker object for each and every one of them. For each of these markers, I bind them with the click event, so when the user clicks on a marker in the map, it displays ...

What are some methods to link to and run a local .exe file in a local browser

I am trying to use html/javascript to run a local .exe file in a local browser. The .exe file will generate asci text and I have it programed to encapsulate the text in html legible to the browser. But I want to have it load the new output from the .exe in the current browser, replacing whats there now. ...

How does javascrypt work in the adress bar?

How does javascrypt work in the adress bar? more spacificaly how do i make a scrypt that goes to a website and clicks a button on that website? (not maliciously, i'd like to be able to do this for personal use. ...