1,330 Posted Topics
Re: Mcrawford3911, HTML supports hidden fields, which are invisible to the user but are addressable by javascript and get submitted with the rest of the form. [CODE=HTML]<input type="hidden" name="input_e" size="10" />[/CODE] This function returns a string version of a number with commas added to the left of a decimal point (if … | |
Re: Tatyana, Javascript allows arrays to have properties and methods in addition to their normal elements [0], [1], [2] etc. Hence we can define all the functions associated with the breakdance animation as methods of a breakdance array, which also holds all the preloaded images. Each function is fairly simple. This … | |
Re: MDanz, You must build the table as you go, in two nested loops :- [LIST] [*]Outer loop - table rows [*]Inner loop - table cells (forming colums) [/LIST] On the assumption that your $report rows should each be represented as a table row, then the following php code should build … | |
Re: Your JSP may be serving something more than just "Yes"/"No". Something as small as a rogue linefeed will cause a test for "Yes" or "No" aways to fail and hence drop through to the [ICODE]else[/ICODE] clause. To see what is actually served, try :- [CODE]alert(x.length); //it is the length you … | |
Re: My guess is that IE is behaving correctly in that it is rejecting "javascript:" in those onclicks. I am amazed that FF handles it ok as I believe it is not obliged to. With onclick, onmouseover, onmouseout etc. etc. browsers know to expect javascript. Little appreciated, you implicitly write an … | |
Re: Anuj576, You want to display a name and the corresponding password? :confused: In a secure system, passwords are typically stored in an irreversably encrypted form and never displayed to anyone, not even a top level administrator. If I understand correctly : a) It sounds like you are inviting password theft. … | |
Re: Ramkumaran, It depends on what is meant by "video file preview". More detail needed. [B]Airshow[/B] | |
Re: Yonghan, In these lines (and maybe others), checkboxes, Update buttons and hidden input fields all get the same [ICODE]id[/ICODE] and [ICODE]name[/ICODE] on each pass through the [ICODE]foreach[/ICODE] loop. It therefore appears that the javascript/jquery code has no way to distinguish one row from another. [CODE=php] $btn = array('id'=>'update','name'=>'update','value'=>'Update'); $data = … | |
Re: Dat0, I think you will find that the HTML format is as follows :- [CODE]<object .....> ..... <param name="wmode" value="opaque"> ..... <embed ..... wmode="opaque" .....> </object>[/CODE] With regard to the value of wmode, it may be worth noting that, according to Adobe ... [INDENT]wmode - Possible values: window, opaque, transparent. … | |
Re: Belper, It's probably best to get index page to set a [I]session variable[/I]. By doing so the referer value will be available to other web pages during the same user session. I'm not a Dreamweaver person but you could try Googling "Dreamweaver session variables" or similar. Alternatively, you could set … | |
Re: Dat0, Block elements restyled as inline render unreliably. It's best not to do it. Where possible use an inline elemt in the first place - notably <span>. Unfortunately, if the (X)HTML/XML is not under your control then you are constrained. [B]Airshow[/B] | |
Re: Dangari, I've not heard the term "degradable AJAX" and can only guess at what it might mean. As Will G says, AJAX simply won't work at all if Javascript is turned off. However, you may choose to cater for (rare?) browsers with low capability Javascript that doesn't support the HTTPRequest … | |
Re: Bnapack, Home page has an xml declaration at the top - the other pages don't. Try getting rid of it. [B]Airshow[/B] | |
Re: MDanz, Try ... [CODE=javascript]<script type='text/javascript'> function urlget(){ var url = parent.link_frame.location.href; var txt = (!url) ? 'URL not found' : url; var area = document.getElementById('urlarea'); if(area) { area.innerHTML = txt; } else { alert(txt); } } </script>[/CODE] ... and [CODE=HTML]<a href="" onclick='urlget(); return false;'>Get link frame's URL</a>[/CODE] [B]Airshow[/B] | |
Re: DemonGal, There's a couple of ways to go. 1) AJAX: A script, which is scheduled to grab a new image url from a corresponding server-side script every 5 minutes, then DHTML it into the DOM. This is about as simple as AJAX gets. 2) But even simpler : Serve the … | |
Re: Hajjo, It sounds to me like it's simply a submit button (or a regular button scripted to give a submit action). I don't think it's anything to do with request scope, which is a server-side thing. [B]Airshow[/B] | |
Re: Cjay, [QUOTE=cjay175;1026564]So my question is, first is this the proper javascript to grab the hash value?[/QUOTE] This is actually very simple. Javascript makes the hash string availabnle as [ICODE]location.hash[/ICODE]. The js standard specifies that the leading # should be included but not all browsers honour this. Therefore use [ICODE]location.hash.split('#')[0][/ICODE] for … | |
Re: Max, That's a good question. I have always assumed NO, search engines will not penetrate javascript orchestrated hyperlinks. However, there's no particular reason why a smart search engine should not do so. But my best guess remains that most search engines will not. A workaround would be to include standard … | |
Re: Anatta, As I see it ...... The question you need to answer is : Where are you going to store the responses such that you can avoid repeats? To help answer that, you need first to ask what scope should the "response-store" have? My main choices would be : [LIST] … | |
Re: Ali, The problem may be that [ICODE]toggleBox[/ICODE] doesn't actually have a toggle action. It shows/hides a dom element depending on what is passed to it as iState. In other words, the reponsibility for which state becomes set, is external to [ICODE]toggleBox[/ICODE]. If [ICODE]iState[/ICODE] is always 1 or always 0 then … | |
Re: Tatt, [CODE=php] for ($i=1;$i<=$num;$i++){ echo "<form>"; echo "<label for=\"words$i\">Word $i</label><input type=\"text\" name=\"words[$i]\" id=\"words$i\" /><br />"; } echo "</form>"; [/CODE] [ICODE]<form>[/ICODE] is inside loop and [ICODE]</form>[/ICODE] is outside. This will mess things up bigtime. Either both inside or both outside depending on what you want. As it stands the code will … | |
Re: Asong, That looks like JSP. This is JavaScript / DHTML / AJAX. Suggest you move/repost in correct section. [B]Airshow[/B] | |
Re: Sid, The effect you describe is designed to indicate which button's action will be triggered if the user hits enter when a form element has focus. Personally I think this is a good idea as it help avoid user error. If you must be rid of the effect, then simple … | |
Re: Nilesh, I just tried and got the same result - onunload doesn't fire if process is killed. I guess you're right - terminating the process acts at too high a level. The javascript engine must die before it has a chance to respond. That said, I tested with IE6 under … | |
Re: DarkRoom, There's not a lot to go on there. For a diagnosis, you will have to post some actual code. [B]Airshow[/B] | |
Re: Scotty, I have to ask why you might want to send image captions back to the server? The reasons I ask are that : [LIST] [*]Captions are not necessarily unique. In a typical gallery for example, you could have a whole string of images with the caption "Sports Day". [*]The … | |
Re: John, You could try something like this: [CODE=javascript] function sendEmail(address, subject, body){ //based on http://www.webmasterworld.com/javascript/3290040.htm if(!address){ return; } var q = []; address += (subject||body) ? '?' : ''; if(subject){ q.push('subject=' + subject); } if(body){ q.push('body=' + body); } var mailto_link = 'mailto:' + address + q.join('&'); addMessage(mailto_link); try{ win … | |
Re: Ttope, All your menus have the same id - [ICODE]id="menu"[/ICODE]. Whereas a class can be repeated as many times as you want, ids must be unique to be useful. Try making each menu id unique, then duplicate the code : [CODE=javascript] var menu=new menu.dd("menu"); menu.init("menu","menuhover"); [/CODE] replacing "menu" with your … | |
Re: Dave, There are two aspects of your E-R schema that you need to learn in order to successfully perform queries. Firstly, your Product_Items and Service_Items are effectively many-to-many link tables. Secondly, there is an optional relationship between Quote_Item_Listing and Product_Items/Service_Items. Both aspects require their own particular SQL to perform both … | |
Re: Graphix, On first look, I would guess that the code you posted above is OK in that it is correctly identifying the content of the highlighted string. The problem would appear to be in some other block of code, where it handles BBcode insertion (or whatever). I guess there's a … | |
Re: Sstewart, Personally, I would do it like this: [CODE=PHP] $query = "SELECT dis_risk_RecordCheck, dis_risk_DisclosureForm FROM cus_discipline_riskmgmnt"; $result = @mysql_query ($query); // Run the query. $output = array(); $output[] = "<table class=\"cards\" width=\"100%\" border=\"1\">"; $output[] = "<tr>"; $output[] = "<th>Record Check</th>"; $output[] = "<th>Disclosure Form</th>"; $output[] = "</tr>"; while ($row = … | |
Re: MDanz, Try [ICODE]top.topframe.getSelection()[/ICODE]. [B]Airshow[/B] | |
Re: Serendipity, The easiest way, in my experience, is not to use a submit button. Instead, use a regular [ICODE]<input type="button" value="Submit" onclick"this.form.submit();">[/ICODE]. The script gives the necessary submit action. Thus, the only way to submit the form should be for the user to click the "Submit" button (or to hit … | |
Re: Ytregnn, "take away"? Best way is to serve the table without the row you don't want. [B]Airshow[/B] | |
Re: Drew, You are going to run into problems trying to accumulate your input data in a textarea. It will go in OK but it will be hard to designate which entry within the accumulated string is to be edited/deleted. I'm not saying it's impossibel but you are making a rod … | |
Re: Cavpollo, You can't convert HTML to CSS. They are different things. CSS is concerned with presentation while HTML "describes" content (and historically allows a certain degree of control over presentation, which should be delegated to CSS these days). What you can do is remove your inline CSS styles and put … | |
Re: Altairzq, Not using [ICODE]document.getElementById()[/ICODE] but you should be able to use [ICODE]document.getElementById('x').document.getElementsByTagName('whatever')[/ICODE] instead, where 'x' is the id of a div wrapper of the first accordion. Then, use id='y' for the wrapper of the other accordion. You should then be able to loop through the resulting collection to target a … | |
Re: I seriously hope it's not possible. Think of the security implications!!!!! What else might be showing on users' screens at the moment the snapshot is taken? [B]Airshow[/B] | |
Re: Ammalgam, Believe it or not a script's [ICODE]src[/ICODE] can itself be scripted so it's very easy to cause different scripts to be loaded into your page. All you need is another script (either hard coded in the page's head, or in an external [ICODE].js[/ICODE] file). Then all you need is … | |
Re: Stymied, Are you aware that with [ICODE]style="...."[/ICODE], you are using CSS? If you need to avoid CSS completely (I'm not so sure whether you need to or not) then you would need to avoid inline style directives. [B]Airshow[/B] | |
Re: SK, I would also not use [ICODE]setInterval[/ICODE] (I have never used it). Instead, create a supervisor function containing a [I]conditional[/I][ICODE]setTimeout[/ICODE] which calls the supervisor iteratively. The condition will allow one or more events to terminate what is otherwise an endless iteration. Restart by resetting flag(s) etc. as necessary, then call … | |
Re: First, you must understand HTML/XHTML and Javascript. Otherwise you will be trying to run before you can walk. Then, get your mind round the fact the the Document Object Model (DOM) is a tree structure and learn a few special Javascript commands to address and manipulate the DOM. There's little … | |
Re: Amodi, You need to investigate [URL="http://www.w3.org/AudioVideo/"]Synchronized Multimedia Integration Language[/URL] or (SMIL), which allows you (amongst other things) to specify a stream of sucessive videos. From [URL="http://www.pwag.org/closedcaption.htm"]here[/URL]: "[SMIL] is a W3C Recommended XML markup language for describing multimedia presentations. SMIL is considered as an industry standard. This language can be used … | |
Re: You could try an [ICODE]innerHTML[/ICODE] approach rather than trying to reuse the object/embed with DHTML. First rewrite the HTML as follows: [CODE=HTML] <body> <p><span class="fontStyle">Introduction</span></p> <div id="video"> <object id="Player" width="100%" height="100%" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="border:0px;"> <param name="autoStart" value="True"> <param name="uiMode" value="full"> <param name="volume" value="50"> <param name="mute" value="false"> <param name="URL" id="objectSrc" value=""> <embed … | |
Re: Ariel, It looks like it's a question of timing. Your 100ms delay is not enough for the page to load. The alert halts execution of the script and introduces extra delay, allowing [ICODE]targetpage.html[/ICODE] to load into the popup window. The solution is not to rely on a prefdefined delay (of … | |
Re: What are you actually trying to achieve? If it is just a question of shuffling images around on the page, then there's no need to involve the database unless you need to get the url of a new image. And even then, there may be ways to avoid the need … | |
Re: Here's a revised [ICODE]sum[/ICODE] function: [CODE=javascript]function sum(){ var form=document.getElementById('eval_edit'); if(!form) return; var s1 = 0; var s2 = 0; var tbl=document.getElementById('sheet'); var iteration=tbl.rows.length-1; for(var i=1; i<=iteration; i++){ var el = form['txtRow'+i]; if(!el) continue; var txt = el.value; if(txt != ( '' + Number(txt) )) continue;//reject non-numeric entries var el2 = … | |
Re: Altairzq, It appears that the browser's HTML parser is tolerant on page load to the [ICODE]<form> ... </form>[/ICODE] tags being inside different table cells. But this tolerance (unsurprisingly) disappears when you insert two separate blocks of HTML one containing [ICODE]<form>[/ICODE] and the other containing [ICODE]</form>[/ICODE]. The reason this is unsurprising … | |
Re: You should never need to rely on the order in which form data appears in the POST/GET. Server-side, you should (CGI?) be able to loop through with an incrementing counter (1 to 130), by which you access the POST/GET variables regardless of the order they were packaged/delivered. This is certainly … | |
Re: Loudstil, When you use javascript to manipulate the DOM directly (as with [ICODE]document.createTextNode()[/ICODE] and [ICODE]el.appendChild()[/ICODE]), the changes are not reflected in the HTML. The HTML (and hence whatever you see with "view page source") only exists to seed the DOM when the page is first loaded. I think I'm right … |
The End.