javascript

Jquery/Javascript conflicts?

I just implemented a multi-language mod onto my website. Problem is that there seems to be a conflict between the javascript files from the language mod and the javascript files that already were on the page. <!-- language files here --> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript...

How to access 3 iframe jpg selections and pass to parent to display image inline

I created a page with 3 iframes lined up next to each other, each of which can select a small jpg (one of 50-100 choices) and each is then displayed within its own iframe for review. User can change each chosen jpg with a refresh button for each iframe. Each iframe and jpg has different height and width dimensions. The jpg's are electric...

how can i check the marker is or isn't in the bounds using google maps v3 .

This is my code,i think it may has some mistakes: var bounds_array; google.maps.event.addListener(map,'bounds_changed', function (){ var bounds_=map.getBounds(); if(bounds_){ var leftBottom=[bounds_.getSouthWest().lat(),bounds_.getSouthWest().lng()] var rightTop=[bo...

Random marker within a rectangular bounds?

this is my code : function getRandom_marker(bounds) { var leftBottom=[bounds.getSouthWest().lat(),bounds.getSouthWest().lng()] var rightTop=[bounds.getNorthEast().lat(),bounds.getNorthEast().lng()] var latlng=[leftBottom[0]+Math.floor(Math.random() * (rightTop[0]-leftBottom[0])), leftBottom[1]+Math.floor(Math.random() * (right...

javascript issue in jsf/icefaces

jsf command button doesn't invoking javascript , please suggestions <ice:commandButton id="submit" onclick="validationmessage();" value="Submit" ...

Simple AJAX request using jQuery not working on IE

Hi guys. This is my code, which sometimes works and sometimes doesn't. var resolve_ajax_login=function(){ $.ajaxSetup({cache:false }); var loginvar=$("#inputlogin").attr("value"); var senhavar=$("#inputsenha").attr("value"); $.post("../model/php/login_ajax.php", {login:loginvar, senha:senhavar}, function(respons...

Regular expression how to search for () and replace with[]

Silly question, but I do not know how to find (2000) into a regular expression and replace it with [2000] ...

jquery code working fine in firefox but giving error in IE "object expected error line 1 char 1"

This code working fine in FF but giving error in IE object expected error line 1 char 1 jquery code $(function () { $('#header_images img:gt(0)').hide(); setInterval(function () { $('#header_images :first-child').fadeOut().next('img').fadeIn().end().appendTo('#header_images'); }, 3000); }); this is added in exte...

How to refer the resultant xml file which is being constructed and saved from webservice file

This is my webservice code which performs constructs xml file and stores to particular destination ,Is this the correct way to store the resultant xml file ,or please let me know if their are any alternate procedure to do so. [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [Sy...

How does Javascript timing really work?

Say I have some code: setInterval(foo,1000); // here is an interval that causes a function to repeat function foo(){ //a number of lines of code } Now, i think of this as causing foo() to be executed every second by the system clock, whereas this: function foo(){ //a number of lines of code setTimeout(foo,1000); } //here is a...

Selecting text in div on mouseover

How can I select text when I mouse over a div? ...

Is it possible for a Javascript bookmarklet to read its own name?

I would like some of my bookmarklets to adjust their behavior based on their current name. For example, I'd like to edit a bookmarklet I use, so that it would increment the last integer in the current URL by 24 if it was named "+24", or decrement it by 10 if it was named "-10". ...

can we return xml document to client side application instead of saving it at particular destination

I have a webservice webmethod which saves the xml output to destination [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Xml)] public XmlDocument GetList( string keyword1, string streetname, string lat, string lng, string radius) { XmlDocument xmlDoc = CreateXML( keyword1,streetname,lat,lng,radius); //save file to ...

Ist there a way to check if two DOM elements are equal?

Hi, It's no problem to find an element by position and the position of an element in Javascript. But is there are general way to compare them? The only way I could think of is comparing ids or classnames, but not all elements have ids or classnames. ...

how to close a browser having pdf inside it.

i have an browser with pdf which is opened on clicking "viewPDF" button in the main page of an asp.net and c#.net application. On clicking the "viewPdf" button i am opening the pdf in the browser using the javascript as below: <script language="javascript"> function openpdf() { var pdfobj= window.open('epcrpdf.aspx'); ...

Pass from PHP to Javascript

Hi All, I have a little problem here, and no tutorials have been of help, since I couldn't find one that was directed at this specific problem. I have 2 hosting accounts, one on a server that supports PHP. And the other on a different server that does not support PHP. SERVER A = PHP Support, and SERVER B = NO PHP Support. On server a...

error :Object doesn't support this property or method

I have an AJAX AsycFileupload in my asp page. When I uploaded a file to a folder "upload", an error message was displayed in the page "Object doesn't support this property or method". //in the script tag function uploadError(sender, args) { document.getElementById('lbl_status').innerText = args.get_fileName() + " "+ args....

javascript form post submit working in IE but not Chrome

Dynamicaly adding a form to a page and submitting it in c#. Works fine in IE but just realized its not working in chrome. Im doing it as a function of a PayPal Transaction Object I built for a little ecomerce app. Here is the code. private void PayPalPostScriptLONG(Page page) { StringBuilder strScript = new StringBuilder...

Javascript Regex - Every sign but not XX

Hi, i must convert a string (user generated) to a regex rule. My problem is that i must say, replace every sign but not a-b, 0-9, minus, dot and comma I hope somebody can help. HTML <div id="d1" class="line1"></div> JS $(function() { new_regex_rule = 'hello,bl.com,dkd-dkd.com,blub,blib,satssan kommt'; // new_regex_rule...

Regex in jQuery

How to put a validation over a field which wouldn't allow only special characters, that means AB#,A89@,@#ASD is allowed but @#$^& or # is not allowed.I need the RegEx for this validation. ...