Friday, 4 August 2006
|
| FAQ - Why was my post not answered? FAQ server 16:31:45 |
| | ----------------------------------------------------------------------- FAQ - Why was my post not answered? -----------------------------------------------------------------------
This could be for several reasons:
* It was a variation of a frequently asked question and was therefore ignored by everyone
* No one knows the answer
* The person with the answer has not seen the post
* It might not be possible to do what you want to do but perhaps readers of clj are reluctant to answer your post in the negative when they are not convinced that it cannot be done.
* The question was not asked clearly enough, or included enough information to be answered.
* The questioner did not realise the need to read the group, for a few days, to see the answers posted there
If it is not one of these, then after a few days consider reposting after checking
http://groups.google.com/
for replies. Make sure the post is phrased well, and everything needed to answer is correct, and the subject is appropriate.
=== Postings such as these are automatically sent once a day. Their goal is to answer repeated questions, and to offer the content to the community for continuous evaluation/improvement. The complete comp.lang.javascript FAQ is at http://www.jibbering.com/faq/. The FAQ workers are a group of volunteers.
|
| | 4 answer | Add comment |
|
| Replace text in text box with innerhtml type thing Bobd314@Gmail.Com 16:18:44 |
| | Currently, I am having a problem replacing the value of a input box with something else using the innerHTML thing. Right now I have something going
<script type="text/javascript"><!-- function changeText(newText){ document.getElementById("WHATEVER").innerHTML=newText } //--> </script>
and a link with
<a href='javascript:changeText("Hola Mi Amigo")'>Dont know</a>
and the text box like
<INPUT TYPE="TEXT" NAME="WHATEVER" id="WHATEVER" VALUE="TESTING" SIZE=60">
and I am trying to replace what is enterd in the text box with "Hola Mi Amigo." However, it doesnt seem to want to do it. Maybe I am doing something wrong, but I have no idea what my problem is.
|
| | 7 answers | Add comment |
|
| How to set style - clip - in javascript? Cylix 15:45:35 |
| | In CSS: clip: px|% px|% px|% px|%
How can I set it in javascript? I have tried x.style.clip.top, x.style.clip.left ...
However, it seems no effect.
|
| | 1 answer | Add comment |
|
| can someone explain the cross domain security re AjAX in IE? Adrian 14:29:36 |
| | can someone explain the cross domain security re AJAX in IE?
I have a page that calls a web service (WS) from another domain (the target browser is only IE6) and displays it's results! all works fine when the page is run from my hdd, however when run from the web I get "Access denied" due to the cross domain security (I assume).
So I set the browser setting to allow cross domain but this did not seem to work, I got the same error!
Next I tried adding an "A" record to my domain for the WS, so I had www.mydomain.com = IP of web server and added ws.mydomain.com = IP of the server providing the WS. But I still got the same error even though they are called using the same domain name!
So what does IE check to establish if its cross domain before allowing the call using XMLHttpRequest to a domain that is different from where the calling page is hosted?
thanks
|
| | 4 answer | Add comment |
|
| window.open() problem in Firefox Rick Brandt 13:40:42 |
| | I am using window.open in an AJAX page and it works in both IE and FF but in the latter the hourglass stays up and both the progress bar and the small animated circle-of-dots graphic keep on running indefinitely in the new window.
I can press the STOP button to get them to stop, but I'm wondering if there is something else I can do to get rid of this behavior. The page is most definitely loading properly and completely.
If it matters what I am writing to the new document is an XML document after being passed through an XSL sheet. Sometimes the XML doc is large enough to fill several pages of the viewport, but often it is just a few lines and the problem is the same regardless.
TIA
|
| | 5 answers | Add comment |
|
| Printer Friendly Page Weetat Yeo 12:21:44 |
| | Hi all ,
I have a print button in PHP page which using javascript window.print() to print web page. However , when user click "print" , the print preview display that the page cut-off and alignment is out.
Read on regarding the matter , and found that is not the issue of PHP . Some users recommend to me to use CSS and HTML to create printer friendly page. However my page is extension is in php , can i use CSS and HTML to create printer friendly page?
Anybody have any sample how to do it is much appreciated ? Thanks
|
| | 2 answer | Add comment |
|
| ie javascript bug problem in this.options TKapler 11:58:37 |
| | i got this simmple function, It stays on onChange on select and on change it hides all objects with ID equal to select name plus the optionvalue. It works perfectly in Opera and FF, but IE crashes because says that options object is null
the problem is in for (optionId in what.options) It seems that IE does NOT return the list of options, but only some other objects: language scrollheight, istextedit, currentstyle, document, and onmouseup
Please can you help me how can I go throuth that cycle? I need to get the values of all options in select. Thank you
function showHide (what) { selectedId=what.options.selectedIndex; selectedValue=what.options[selectedId].value; selectedObject = document.getElementById(what.name+selectedValue); selectedObject.className=""; for (optionId in what.options) { optionValue=what.options[optionId].value; if (optionValue) { optionObject = document.getElementById(what.name+optionValue); if (optionId!=selectedId) { optionObject.className="hidden"; } } } }
|
| | 3 answer | Add comment |
|
| draw grid lines over an image in Javascript Guest 11:12:51 |
| | Hey there,
I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover 100% of the image, and all I would need is a set of horizontal and vertical lines over the image to create a grid overlay
Is there a way I can leverage some functionality in Javascript to do this? I can't use any server side 3rd party components, and I would rather not do this using something on the server side like GDI+ through ASP.NET.
Thanks,
Christian
|
| | 10 answers | Add comment |
|
| Modify Script to change background color based on Array Index DavidB 09:39:26 |
| | Greetings
I don't know if this is possible, but this group should be able to tell me.
I have a webpage with a changing message board (I understand the problems with having changing text, but this was a nice victory over the demand for a scrolling message). The messages are updates on community information. What I would like to be able to do is have the background color (and possibly font color) change based on the Array Index. For example, if the pool is going to be closed for chemical treatment, I would like the display to have a red background. If there is going to be street cleaning requiring the removal of vehicles, I would like a yellow background. For all other messages, a default blue background.
The code I am working with and abbreviated CSS & HTML are:
<script type="text/javascript"> var msgIX = 0; var msgs = [ " Notices and Messages", \* RED *\ "Chemical Treatment August 21", \* RED *\ "Pool Closed", \* RED *\ " Notices and Messages", \* YELLOW *\ "Street Cleaning August 12 ", \* YELLOW *\ "Remove your Vehicles from the street ", \* YELLOW *\ " Notices and Messages", \* BLUE here down *\ "Family Movie Night is ", "August 25 ", " Notices and Messages", "Pub Night and Quiz is ", "October 14 or 21 (TBD) ", " Notices and Messages", "Pot Luck Dinner is ", "November--Exact Date TBD ", " Notices and Messages",]; function scrollMessages(milliseconds) { window.setInterval ("displayMessage()", milliseconds); } function displayMessage() { if (document.getElementById != null) { var heading = document.getElementById("scrollme"); heading.firstChild.nodeValue = msgs[msgIX]; }else{ if(navigator.appName == "Microsoft Internet Explorer") { var heading = document.all.item("scrollme"); heading.innerText = msgs[msgIX]; } } ++msgIX; msgIX %= msgs.length; } </script> <style> #noticebox { padding:"2px"; border-width:"2px"; border-style:inset; border-color:blue; width:174px; height:"42px"; z-index:30; text-align:-moz-center; text-align:center; background-color:"#ceg"; left:0; } </style>
<body onload="scrollMessge(2000)">
<div id="noticebox"> <p class="mainbold" id="scrollme"> Notices and Messages</p> </div>
Any assistance would appreciated--even if it entails telling me it cant be done.
Thanks DB. .
|
| | 2 answer | Add comment |
|
| Why not Prototype? (Was: Re: Issues with IE & Prototype/AJAX) Ray 09:36:25 |
| | Richard Cornford wrote:> I would never use Protoytpe.js, I know javascript. <snip>
What's wrong with Prototype? What do you think of other libraries like Dojo toolkit or X ?
Thanks, Ray
Richard.
|
| | 7 answers | Add comment |
|
| Saving Form Items upon Unloading.... Mel 07:57:07 |
| | I need to go through each and every one of the form elements on my page and save them to a file, so that when a user returns from whereever, i can present the data back to the user.
Has anyone done this kinda thing ?
thanks in advance
|
| | 6 answers | Add comment |
|
| javascript field check Guest 06:22:59 |
| | Hello,
I'm having some problem with checking with the follwoing code:
if (appForm.q15a[i].checked==true && appForm.q15cert.value==""){ alert ("You must enter value!!!!") valid = false; }
What I'm trying to do is have the user enter some data based upon if the radio button is true and the text field is empty. What could be wrong with the following code above.
Kevin Davis
|
| | 1 answer | Add comment |
|
| value check function starts endless loop Guest 06:20:23 |
| | I have a function to check a string to make sure it is 6 digites using the trigger onBlur="CkFrmt(this)" Problem is I've got 4 fields in a row...if I enter a wrong number in the first and hit tab I get the error message and my script tries to move the focus to the first item...but because I hit the tab the focus in already on the second item which does not contain a 6 digit value so I must kill the page. help!
function CkFrmt(str) { if ( !Is_In_Format( str.value, "dddddd" )) { alert("You must enter a 6 digit number"); str.focus(); str.value=""; } } function Is_In_Format( str, format ) { for ( var i = 0; i < format.length; i++ ) { if ( format.charAt( i ) == "d" ) if ( !Is_Digit( str.charAt( i ) ) ) return false; } return true; } function Is_Digit( chr ) { if ( ( chr < "0" ) || ( chr > "9" ) ) return false; return true; } </script>
|
| | 7 answers | Add comment |
|
| Close popup window on session expire Guest 06:19:00 |
| | Hi
Popup window is opened and after some time session has expired. After session expire, if the user tries to make any actions on the popup page the user is redirected to login.jsp page.
What I want is when the user tries to make any actions on the expired popup I want the popup window to be closed and parent window to be refreshed with the login.jsp page. Basically I want identify the popup window.
I did the following with some assumptions and it works on firefox but not on IE. Assumption: Popup window will not have address bar visible
added the function in onload of login.jsp
function onLoadLoginPage(){ if(window.locationbar.visible==false){ opener.location.href='login.jsp'; this.close(); } }
any suggestions or solutions will be a great help
Thanks venkat
|
| | 1 answer | Add comment |
|
| Issues with IE & Prototype/AJAX Steve-O 06:02:00 |
| | The following code works great in FireFox, Opera, Netscape, Safari, and Gecko, but NOT IE. Why?
I tried using 'native' js with setInterval and setTimeout, but I get the same result. My IE security settings are not an issue.
Anyone have any insight on this?
Thanks! -sh ***************************************************************** // JavaScript Document var ud1 = new PeriodicalExecuter(getIncrementer, 5); var ud2 = new PeriodicalExecuter(getMicrotime, 5);
function getIncrementer() { var url = 'filter.htm'; var myAjax = new Ajax.Request( url, { method: 'get', onComplete: showMyData }); }
function getMicrotime() { var url = 'filter2.htm'; var myAjax2 = new Ajax.Request( url, { method: 'get', onComplete: showMicrotime }); }
function showMyData(req) { //put returned Text/XML in the textarea $('my_div').innerHTML = req.responseText; }
function showMicrotime(req) { //put returned Text/XML in the textarea $('microtime_div').innerHTML = req.responseText; }
|
| | 9 answers | Add comment |
|
| onload Ganeshnarayan 05:38:48 |
| | Hi, i have a form with name "abc". in that i have 4 textboxes(inputbox) and one hyperlink(name/id ="qqq").
On loading the page i need the focus to the hyperlink.
How can i achieve this?
Kindly help me..
Thanx in adv.
Ganesh
-- ganeshnarayan ------------------------------------------------------------------------ ganeshnarayan's Profile: http://www.highdots.com/forums/member.php?userid=107 View this thread: http://www.highdots.com/forums/showthread.php?t=1371248
|
| | 6 answers | Add comment |
|
| Problem about javascript boolean Cylix 05:03:41 |
| | I have a function to validate the form I created: ------------------------------------------------------------------------------------------------------------------------------------ function frmValidation(frm) { var elems = document.forms[0].elements; var i,rtn=true; for (i=0;i<elems.length;i++) { if (elems[i].type=='checkbox') { if (elems[i].checked) { var obj = elems[elems[i].name+'Ctl']; if (obj) { rtn=rtn&&eleVal(obj); } } } } if (elems['greeting']) rtn=rtn&&eleVal(elems['greeting']); if (elems['message']) rtn=rtn&&eleVal(elems['message']); if (elems['disclosureInfo']) rtn=rtn&&eleVal(elems['disclosureInfo']); if (!rtn) { showErrMsg('Please correct the field marked '+fail+' which is/are not valid.'); } return rtn; } ------------------------------------------------------------------------------------------------------------------------------------- I expected the function will check out all the input I need, the checking using eleVal(obj); rtn will add up(AND) all the result, if one of result return false, finnally, a message will shown up.
However, When one of result returned false, that is rtn=false, the eleVal(obj) will not be execute anymore ...
|
| | 3 answer | Add comment |
|
| Misleading cellIndex values with rowspan/colspan Matt Kruse 04:25:48 |
| | Using the .cellIndex property of a TH element to find out which table column it is over can cause misleading results when the table has cells which have rowspans or colspans greater than 1. See example: http://www.javascripttoolbox.com/temp/table_cellindex.html (code pasted below for reference)
This behaves according to specs and expectations, however the value of the cellIndex property becomes less useful when using it to determine which column to sort onclick, etc.
I plan to write some code to calculate the "actual" column index of each cell in a <thead> of a table. But if anyone has already done this exercise, please do share so I can perhaps use my time working on something else
Thanks!
EXAMPLE CODE:
<html> <head> <title></title> <script type="text/javascript"> window.onload = function() { var ths = document.getElementsByTagName('TH'); for (var i=0; i<ths.length; i++) { ths[i].innerHTML = ths[i].parentNode.rowIndex + "," + ths[i].cellIndex; } } </script> <style> th { vertical-align:top; text-align:left; width:50px; } </style> </head> <body> <table border="1"> <thead> <tr> <th rowspan="2"> </th> <th> </th> <th> </th> <th> </th> <th> </th> </tr> <tr> <th colspan="2"> </th> <th rowspan="2"> </th> <th> </th> </tr> <tr> <th colspan="2"> </th> <th> </th> <th> </th> </tr> </thead> </table> </body> </html>
-- Matt Kruse http://www.JavascriptToolbox.com http://www.AjaxToolbox.com
|
| | 7 answers | Add comment |
|
| Stopping/starting WMA Andrew Poulos 03:08:05 |
| | I'm using Windows Media Audio, via a WAX file, and I have some custom controls to start and stop the audio. While it works in IE, FF gives an error. The HTML looks like this:
<object id='obj' type='audio/x-ms-wax' style='position:absolute; left:0px; top:0px;' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codeBase='http://activex... blah width='100' height='100'> <param name='FileName' value='wma_sample.wax'> <param name='AutoStart' value='0'>
<embed id='objff' type='audio/x-ms-wax' src='wma_sample.wax' autostart='0' width='100' height='100'></embed> </object>
and the relevant FF JavaScript look like this:
if (typeof document.getElementById('objff').Play != "undefined") { document.getElementById('objff').Play(); } else { alert("An error occurred and the audio could not be played."); }
If I change the type and the sample to an MP3 file then the custom controls work in FF. Is there a way to get FF to control WMA?
Andrew Poulos
|
| | 6 answers | Add comment |
|
| What does this script means? Cylix 02:30:04 |
| | this.menus = { root: new Array };
|
| | 5 answers | Add comment |
|
| code to direct users to different pages based on radio selection Greg Southerland 00:42:21 |
| | How would I direct users to a different page based on which radio button they select in a form? Thanks for any help you can provide.
Greg
|
| | 1 answer | Add comment |
|
| Any way to override submit behavior for input img? Christopher.Secord@Gmail.Com 00:28:56 |
| | Normally, a button like <input type="image"> is also a submit button. Is there any way to override that so that it has an onclick event but does not submit the form?
For what I'm trying to do, I cannot use an <img> element with onclick. I have to use a form element (and I'd rather have an image than a button)
Thanks in advance for any insight. chris
|
| | 3 answer | Add comment |
Thursday, 3 August 2006
|
| Need help - Using Javascript to talk to a remote server RoyX 22:38:02 |
| | Hello -
I am trying to embed JavaScript to an ASP page which will be executed on the server side and will send a HTTP request from the ASP Web server another remote server. Then I need to capture the remote server's response and save it as a string.
Any help will be greatly appreciated.
Thanks!
|
| | 4 answer | Add comment |
|
| resolution css redirect script Kobus Dp 22:16:19 |
| | Hi Guys
The script below works perfectly in Mozilla, but not in IE... any ideas? It specifies a specific style sheet for 3 types of resolutions.
---------------------------------------------------------------------------
var myWidth = 0;
if( typeof(window.innerWidth) == 'number' ) { myWidth = window.innerWidth; }else if(typeof(document.documentElement.clientWidth) == 'number'){ myWidth = document.documentElement.clientWidth; }else if(typeof(document.body.clientWidth) == 'number'){ myWidth = document.body.clientWidth; }
if (myWidth <= 1280) { document.write('<link rel="stylesheet" type="text/css" href="about_1280.css">'); } if (myWidth <= 1024) { document.write('<link rel="stylesheet" type="text/css" href="about_1024.css">'); } if (myWidth <= 800) { document.write('<link rel="stylesheet" type="text/css" href="about_800.css">'); }
------------------------------------------------------------------------
Thanks K
|
| | 2 answer | Add comment |
|
| Public static method accessing private method Guest 22:00:52 |
| | Hi there, I'm trying to do something, but I don't know if it's possible. Basically, I want to have a public static class method that could access a private object's method. I would like to be able to do :
Class.method(InstanceOfClass);
The method would then access a private function from Class by doing something like
function method(param) { param.privateMethodOfClass(); }
I've done a lot research and experimentations but just can't come up with a solution... I don't even know if what I'm trying to do is possible.
Any help would be appreciated. Thanks.
|
| | 4 answer | Add comment |
|