1,330 Posted Topics

Member Avatar for avukadomusic

It's possible that some server directive has been altered (or your site has been rehosted), and [ICODE]file_get_contents($url);[/ICODE] is no longer retreiving file contents, particularly if the file is served from a different domain. If so then you need to speak with your hosting company/server admins. [B]Airshow[/B]

Member Avatar for avukadomusic
0
166
Member Avatar for feoperro

I'm not sure I fully understand but here's what I know: To hyperlink a page into the "body" frame from the "header": <a href="myPage.jsp" target="body">xxx</a> If you need to pass parameters then: <a href="myPage.jsp?a=1&b=2&c=3" target="body">xxx</a> Server-side just do whatever is necessary with regard to redirection and usage of the parameters. …

Member Avatar for Airshow
0
200
Member Avatar for OkieUnix
Member Avatar for solomon_13000

Solomon, I think the problem is that the javascript is crashing before it's done anything. There's a double [ICODE]}[/ICODE] at the end of the function where there should be just one. That should fix it, but of you're interested in a technique that avoids setting a global, then try this …

Member Avatar for Airshow
0
123
Member Avatar for Tekkno

You could simply set up a couple of associative (hash) arrays and use them to look up "coded" values: [CODE=php] $categories = array( 'a' => 'cat', 'b' => 'dog', 'c' => 'orange', 'd' => 'apple' ); $subcategories = array( 'a' => 'carpet', 'b' => 'wardrobe', 'c' => 'door', 'd' => …

Member Avatar for SKANK!!!!!
0
154
Member Avatar for pbpyrojust

Pbpyrojust, The answer will lie in where you set [ICODE]$yes[/ICODE] and [ICODE]$no[/ICODE]. Could you post the code? [B]Airshow[/B]

Member Avatar for pbpyrojust
0
75
Member Avatar for psyb0rg

psyb0rg, Ajax is indeed the way to go. First some javascript: [CODE=javascript] function createRequestObject(){ if(window.XMLHttpRequest) { return new XMLHttpRequest(); // IE 7, Firefox, Safari, Opera... } else if(window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer 6, 5 } else { alert('Problem creating the XMLHttpRequest object'); } return false; } function …

Member Avatar for psyb0rg
0
138
Member Avatar for Chad Gary

Your data is now two levels deep so you ned nested loop in your onsuccess handler to access it. It will be something like: [CODE=javascript] $H(emptyAssociativeArray).each(function(player) { $H(player).each(function(pair) { $('workaroundOutput').insert('<div>' + pair.value + '</div>'); }) }); [/CODE] You may need to check the Protoype API to see if $H(...).each works …

Member Avatar for Airshow
0
74
Member Avatar for usmanabb

usmanabb, What size is the original in px? It's hard to tell from the way Daniweb serves image attachments. [B]Airshow[/B]

Member Avatar for Airshow
0
268
Member Avatar for zegames

My immediate thought is that you could md5(innerHTML onload) your div's and store the reult (as a JavaScript variable). Then, whenever you need to know if the div's contents have changed, compare md5(current innerHTML) with the stored md5. Md5 would be a cheap way to store a representation of innerHTML …

Member Avatar for Fest3er
0
2K
Member Avatar for CNSKnight

Asknight, The contructor function [ICODE]Slider[/ICODE] contains a strange mixture of ideas! Chiefly, [ICODE]sliderEngine[/ICODE] is global and is an instance of [ICODE]Slider[/ICODE], but [ICODE]Slider[/ICODE] refers to [ICODE]sliderEngine[/ICODE] internally where (I guess) it should use [ICODE]this[/ICODE]. [ICODE]$[/ICODE] and [ICODE]dc[/ICODE] are set within [ICODE]Slider[/ICODE] but without a leading [ICODE]var[/ICODE], hence they are global. …

Member Avatar for CNSKnight
0
224
Member Avatar for Xessa

Xessa, This is very simple, though maybe not obvious. First create a funtion in your main page [CODE=javascript] function popUpCallback(x){ var b = document.getElementById('b1');//the button that you want to hide/show if(b) { b.style.display = (x) ? 'inline' : 'none'; } //Add/modify this function to do whatever you want in the …

Member Avatar for Krishna_vs
0
99
Member Avatar for whitestream6

Whitestream, [QUOTE=whitestream6;941891]I'm trying to get the code so that the URL is similar to these: [url]http://www.autoweek.nl/carbase_data.php?id=45405&cache=no[/url] [url]http://library.digiguide.com/lib/programmenextshowing/238308&hPage=2[/url] where the query string has multiple parameters.[/QUOTE] Your url can't be similar to both of these examples. You must choose one or the other, and unless you want to make a lot of …

Member Avatar for Airshow
0
195
Member Avatar for Rhino1272

Rhino, Your version-3 is fine because you are aligning text. The issue with text-align and block elements (not just <div>) is that the various browsers render differently if you try to use [ICODE]text-align:center[/ICODE] or [ICODE]text-align:right[/ICODE] to control the position of a block element itself within a wider, containing block element. …

Member Avatar for Airshow
0
74
Member Avatar for Cheeki

I'm not sure I fully understand. Do you want a 2-level (or n-level) hierarchy of buttons (ie. buttons organised into groups)? If so then Ajax is overkill. You could download the whole button hierarchy as a set of nested javascript objects, together with a set of routines for displaying & …

Member Avatar for Airshow
0
266
Member Avatar for feoperro

AH, You can try this: [CODE=javascript] onload = function(){ var s = document.getElementById('mySel'); s.onchange = s.onblur = function(){ this.style.width = '150px'; }; s.onmouseover = function(){ this.style.width = '310px'; }; } [/CODE] [CODE=HTML] <select id="mySel" style="width:150px;"> <option>Option a</option> <option>Option b</option> <option>Option c</option> <option>Option d</option> <option>Option e</option> <option>Option f</option> <option>Option g</option> <option>Option …

Member Avatar for Airshow
0
111
Member Avatar for deleti0n

deleti0n First, by passing a second parameter to your functions, you make them more flexible, and you can get rid of "decrement" because it is just "increment" with a negative value. Then, there's a number of ways to do the sequence. There are three below, in increasing order of complexity …

Member Avatar for essential
0
157
Member Avatar for swastikpadhy

You could try [code]var screen = document.getElementById[COLOR="Red"]([/COLOR]'newComponentDetailsEntryForm'); screen.[COLOR="Red"]setAttribute('action', "<%= request.getContextPath()%>/" + "newComponentDetailsEntryViewAction.do")[/COLOR]; screen.submit();[/code] [B]Airshow[/B]

Member Avatar for elreso
0
301
Member Avatar for arunajasmine

aJasmine, Shawn is right, and the [URL="http://docs.jquery.com/Ajax/jQuery.getJSON"]jQuery Documentation for jQuery.getJson[/URL] confirms it : "Note: Keep in mind, that lines after this function will be executed before callback." Hence, if you want to do something, reliably, with the Json response, then it needs to be stimutated (or enabled) within jQuery.getJson's callback …

Member Avatar for Airshow
0
1K
Member Avatar for genesistr

Genesistr, Inheritance in JavaScript is a pretty large subject and in all probability not at all like what you're used to in other languages. What ever else you read on the subject, you must read these - both by the master, Douglas Crockford: [URL="http://javascript.crockford.com/prototypal.html"]Prototypal Inheritance in JavaScript[/URL] [URL="http://javascript.crockford.com/inheritance.html"]Classical Inheritance in …

Member Avatar for Airshow
0
137
Member Avatar for morecrab

MoreCrab, You're in the wrong forum, but here's the answer: [CODE=HTML]<table class="thickBorders"> <tr><td>Name</td></tr> </table>[/CODE] [CODE=css] .thickBorders { border:thick; border-style:outset } [/CODE] [B]Airshow[/B]

Member Avatar for morecrab
0
92
Member Avatar for whiteyoh

Whitey, This is very confused! From the user perspective, what are you trying to achieve? [B]Airshow[/B]

Member Avatar for whiteyoh
0
177
Member Avatar for kako13

Kako, Easiest way is to use an <a> tag: [CODE]echo "<a href="$path" target="_new">Click Me</a>";[/CODE] You can use <button> if you want but you then have to use window.open etc. etc. because <button> was included in the HTML spec for form submission as an alternative to [ICODE]<input type="button">[/ICODE], [ICODE]<input type="select">[/ICODE] or …

Member Avatar for Airshow
0
168
Member Avatar for shaiss

Shaiss, The function will simplify to this: [CODE]function BuildQueryString($orderNumber, $order_detail){ $prodURL = array("OrderNumber=$orderNumber"); for($i=0; $i<count($order_detail); $i++){ $prodURL[] = "SKU" . ($i+1) . "=" . $order_detail[$i][2]; $prodURL[] = "Qty" . ($i+1) . "=" . $order_detail[$i][3]; } return implode('&', $prodURL); }[/CODE] I've not tested but this should work within itself. It's overall …

Member Avatar for Airshow
0
125
Member Avatar for Bhilal

Bhilal, There are essentially two techniques (with thousands of variations) for loading/reloading part of a "page": [LIST=1][*]Frameset/iFrame [*]AJAX[/LIST] Full descriptions are beyond the scope of a Danweb answer. Try googling these terms with the word "tutorial". You should get loads of results. [B]Airshow[/B]

Member Avatar for Airshow
0
74
Member Avatar for kako13

Kako, Divs are not layers. They are general purpose block elements - ie, they are rectangular and stack vertically on the page [ in the y (height) dimension not z (depth) ]. Netscape implemented an HTML <layer> element but it is now well and truely obsolete. Like other HTML elements …

Member Avatar for kako13
0
161
Member Avatar for arunajasmine

Arunajasmine, I agree with lordSpace that composing the table server-side would be the easiest thing if (a) the server-side script is under your control and (b) you don't need to access the tabulated values for any other purpose. If you want/need to build the table client-side then try this: [CODE] …

Member Avatar for arunajasmine
0
134
Member Avatar for progtick

Progtick, That looks like an ASP custom attribute. If so, then you're in the wrong forum. Suggest you ask in "ASP". [B]Airshow[/B]

Member Avatar for Airshow
0
75
Member Avatar for sonia sardana

Sonia, You might like to try something like this: [CODE=javascript] //This is a general utility function that returns an Initial Caps version of the input string function initialCaps(str){ var a = str.split(' '); for(var i=0; i<a.length; i++){ ch = a[i].charAt(0); a[i] = a[i].replace(ch, ch.toUpperCase()); } return a.join(' '); } //This …

Member Avatar for Airshow
0
234
Member Avatar for fakhrizaki

Fakhrizaki, In my experience div {display:inline;} is ineffective and/or unsafe. Suggest you purge if possible. See style="..." at lines 71 & 79. Apart from that it's hard to say what might be wrong. The good news is that the page appears to behave itself in FF 3.0.11 under Win2000, screen …

Member Avatar for fakhrizaki
0
88
Member Avatar for star69

Star69, At lines 28(x2), 34 and 36 you have apostrophes, which are the same character as single quote, therefore muchos confizion. You must either put the string in [ICODE]"double quotes"[/ICODE] or escape all apostrophes like this - [ICODE]Owner's[/ICODE]. [B]Airshow[/B]

Member Avatar for star69
0
182
Member Avatar for osirion666

Osirion, You don't need to use a hidden field for this. You can test to see which submit button was clicked in JSP. The clicked button will appear in the POST parameters - the other two won't. I can't remember the syntax in JSP but I'm sure you know that. …

Member Avatar for osirion666
0
282
Member Avatar for LurkerPatrol

Lurker, Personally I choose not to set what are effectively "labels" as field values. The reason being that once a value has been entered, the "label" is no longer available to be seen by the user. He/she is thus denied full confidence when doing a last scan of the form …

Member Avatar for Airshow
0
108
Member Avatar for napsternapster

Napster^2, Not sure but it may be [ICODE]var xmlhttp = new GetXmlHttp();[/ICODE]. Typically GetXmlHttp() would return an xmlHttpRequest object, so [ICODE]new[/ICODE] would not be required in the call. Of couse I can't tell for certain without seeing the GetXmlHttp function but it's possible that FF is sensitive to this. [B]Airshow[/B]

Member Avatar for Airshow
0
92
Member Avatar for phpbeginners
Member Avatar for vtek

Vtek, Are you editing in MS Word? Guaranteed grief. Use notepad, or my favourite 1st Page 2000/2006 by [URL=http://www.evrsoft.com/]Evrsoft[/URL] [B]Airshow[/B]

Member Avatar for langsor
0
135
Member Avatar for whiteyoh

Whitey, [ICODE]$myDirectory = opendir(".");[/ICODE] is indeed the line that determines which directory is listed. If you want to list some other directory then it depends on where it is relative to the php script location. You need something like: [LIST][*][ICODE]$myDirectory = opendir("./myDir");[/ICODE] (a dir within the current dir) [*][ICODE]$myDirectory = …

Member Avatar for Airshow
0
90
Member Avatar for Nattynooster

Best thing would be to purge floats completely but that seems not to be possible because (inexplicably) you lose control of height and width of the li/a elements, at least in IE6 and hence lose some of the visual effect. Try this: [CODE=css]#menu { background:url("images/menubg.gif") repeat-x top; height: 163px; margin-bottom: …

Member Avatar for MidiMagic
0
130
Member Avatar for gackerman43

Gackerman, You could use an inline style like this: [CODE=html]<div dojoattachpoint="_embedGroupButton" class="embed_group button" style="display:none">Embed</div>[/CODE] or put the style in a style sheet: [CODE]<style type="text/css"> .embed_group button { display:none; } </style>[/CODE] As this would apply to all elements with [ICODE]class="embed_group button"[/ICODE], you could alternatively give the element an id as follows: …

Member Avatar for MidiMagic
0
92
Member Avatar for beko

Beko, Assuming you want fixed width content of 750px, try the following css: [code=css]#alignment { width: 750px; position: relative; left: 50%; margin-left: -375px; }[/code] [I](add further directives as required)[/I] I can't really explain your horizontal scroll bar but can only assume it's caused by some wide content (maybe an img, …

Member Avatar for Airshow
0
74
Member Avatar for veledrom

Or use [ICODE]method="get"[/ICODE] instead of [ICODE]method="post"[/ICODE] to pass request parameters when the page is originally requested. [B]Airshow[/B]

Member Avatar for Airshow
0
114
Member Avatar for bakshi123

Bakshi, In your forst paragraph you say, "the chosen data then needs to be stored and saved in a xml file". Where exactly do you intend this file to be saved and can you post the code that is supposed to perform the save? [B]Airshow[/B]

Member Avatar for Airshow
0
545
Member Avatar for bbqkaren

BBQKaren, First and foremost - Javascript and Java are completely different languages. Google "java versus javascript" for many detailed discussions and explanations. For your problem, you need code not only to hide the tables initially, but also to generate the +/- controls. Otherwise the small minority with javascipt disabled will …

Member Avatar for bbqkaren
0
373
Member Avatar for dragovian

Drago, So what behaviour do you get in IE? It's hard to disgnose without knowing the symptoms. [B]Airshow[/B]

Member Avatar for Airshow
0
127
Member Avatar for Lolalola

Taking Essential's suggestion one very small step further, you can avoid using a global variable by tucking the [ICODE]setInterval[/ICODE] reference away somewhere other than the global namespace - for example as an attribute of the "time_now" document element, like this; [CODE=javascript]$(document).ready(function(){ //Paleidimo funkcija var time_ref = setTimeout(function(){ $('#time_now').attr({ t_ref : …

Member Avatar for essential
0
92
Member Avatar for Lolalola

Lolalola, As far as I can tell, an IE XMLHTTP request is a one-shot affair whereas in Moz it will work many times over. As such, there is little point in making your "http" global. It can (and should I believe) be declared within [ICODE]sendRequest()[/ICODE] with [ICODE]var http = createRequestObject();[/ICODE]. …

Member Avatar for hengzhe
0
727
Member Avatar for jt3204

Aaaaaaaaagh!!!! Did I hear a distant pop? I think ShawnCPlus just burst a blood vessel. [B]Airshow[/B]

Member Avatar for jt3204
0
138
Member Avatar for chorcho

Chorcho, I can think of two solutions. Unfortunately I'm sure that neither is what you want to hear! 1. Use a regular JPG, GIF or PNG in place of the .swf. You can achieve very similar mouseover effects with an image map and dhtml mouseover handlers. GIFs and PNGs can …

Member Avatar for Airshow
0
300
Member Avatar for dwrakh

Dwrakh, I can't offer you any code (it would take me between a week and a month to code this up) but I can explain in principle how to go about it. Devlop a Chess class in a server-side web language such as PHP. This class will include a data …

Member Avatar for dwrakh
0
143
Member Avatar for Zurompeta

Mmmmm, hard to say. Is there an independent page for each of the two tabs or one "template" page? If the pages are independant then look for differences in the structure and CSS of all containing elements from body down to the calendar element. If the pages arise from a …

Member Avatar for Airshow
0
205

The End.