|
Hi All,
Ok, so I'm fairly new to JS, and I thought I was on fire until today. Here's the background:
I have a drop down list, with an icon next to it.
I am using ClueTip (based on Jquery library) to show a pop up image with text when you hover over the icon image.
The ClueTip function gets the details of which image to show etc from the TITLE and REL
values of the icon image.
On loading the page, everything works fine, because the Title and Rel values are set on the Page Load event.
When the DDL changes, I expect to change the values of Title and Rel, which would then allow a different image and text to be shown when the icon is hovered over.
Here's the problem:
I have just realised that JS doesn't seem to change the actual HTML that the browser has. After I try to change the Title and Rel values, I expected to be able to view the page source, and see a change in those values. I expected that the ClueTip function would read these changed values.
How wrong I am. Can someone help, and if you've a little time, explain how JS makes changes to the webpage without changing the source. (my best guess is that is does change it, not visibly, but in memory???).
Thanks
|
|
|
|
|
Ok, after a few hours, I've worked out the problem.
I needed to RE-BIND cluetip after making the change to the DDL.
Cluetip caches the URLs etc on loading, and holds on to the params until it's effectively 'refreshed'.
If someone has time to explain how JS makes changes to the webpage, I would still be very interested.
|
|
|
|
|
Ginozzzz wrote: Can someone help, and if you've a little time, explain how JS makes changes to the webpage without changing the source.
It changes the DOM, the underlying browser object model created from the original source. Some browsers will automatically generate a new source representation for you; others will only show you the source as it was originally downloaded from the server.
I suggest you get your hands on Firebug[^]. Nothing better for debugging DOM issues.
|
|
|
|
|
Hi,
When I type in a new URL then it opens it up in a new tab, this is annoying. How do I set it to display in the current tab?
Thanks
Brendan
|
|
|
|
|
Does anyone know,does Apache support the ISAPI interface.
Regards
Bram van Kampen
|
|
|
|
|
mod_isapi[^]
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks,
Yes, all that seems to work of sorts. My simple cgi just pumps an HTML page to stdout. I get at the client end a hung page and at the server:
[error] [client 127.0.0.1] malformed header from script. Bad header=<HTML>: Logon.cgi, referer: http://localhost/
If I launch the html directly it works fine.(i.e. No Syntax Errors in the HTML Script)
I get HTML Error 403 for the ISAPI I wrote, at the Client side. At the Server Side, No Error Messages in the Error Log.
Logon.cgi is as follows:-
<br />
int main(int argc,char* argv[]){<br />
<br />
<br />
DbgBreak();
<br />
FILE* F=fopen(".\\PrivateHtm\\Logon.htm","r");<br />
FILE* G=fopen(".\\PrivateHtm\\LogonResult.htm","w");<br />
char Buf[4096];<br />
while(fgets(Buf,4000,F)){<br />
puts(Buf);<br />
fputs(Buf,G);<br />
}<br />
fclose(F);<br />
fclose(G);<br />
return 1;<br />
}<br />
Bram van Kampen
|
|
|
|
|
hi all
I have a BHO application (C#)
anyone knows if I can use cookies with BHO ? if so, how?
thanks
|
|
|
|
|
Hi Friends,
I just saw a company from India, www.shrishtionline.com They can offer complete web solution to all.
Shrishti Informatics is a Professional Outsource Website Design & Development company based in
Cochin, India. They are experts in website design, dynamic web solutions, Multimedia and
Graphics Design, Search Engine Optimization ,offshore staffing and offshore outsourcing .
Also does customization of open source technologies such as osCommerce, Joomla, phpBB,CRE Loaded,
phpFoX, WordPress etc.make use of this great time and create your personal and business site now.
Will post more valuable news latter. Really would like to know your thoughts regarding this company.
Regards,
Mechele peters.
|
|
|
|
|
I have a JS that sends a request to a PHP script:
getBlog(alias,numPosts); The PHP script will create a custom object called $blog, and call the SQL database to get the last posts of the blog.
The blog posts will then be added to the $blog object which will be json encoded and returned to the JS:
echo 'handleResponse('.json_encode($blog).');'; Back in the JS I eval the object and then I have to loop through it and create its JS counterpart.
This is done because the blog object in JS has some member functions I wanna be able to use (like creating styleable DOM nodes filled with member strings).
One of the problems with this is that whenever I remodel the $blog object I must remember to remodel its JS counterpart.
I was thinking that maybe I should only create the object in PHP and then loop through it and echo it as a string.
The string would be formatted for javascript syntaxing.
Then I could use that document as a script src and thus retrieve the JS object definition automatically.
That way I would only have to keep track of the PHP object and of course the SQL.
Have I missed something that would be of use in this situation to more
easily have an object flow from SQL through PHP to JS and back?
Ideally I would want a custom object that only contains the member variables and values (JSON object).
That object would then be equipped with member functions to do DOM stuff when it is in JS,
and it could be equipped with funtions to do SQL stuff when in PHP.
|
|
|
|
|
Hi,
I am working on a application in which i drag the items from top div and drop them on bottom div. I am using ondrop event. It is working fine on IE but ondrop event not working on mozilla browser. What could be possible solution to solve this problem?
Thanks in advance.
|
|
|
|
|
|
I have tried both short and long answer before asking question . That's why i asked if there is any other solution .
|
|
|
|
|
No, no other solution exists. Mozilla just doesn't support it natively. So, either go with the cross-browser approach or just ask folks to only use IE with you Web app. Either solution is good, though that statement often starts flame wars from the non-IE crowd of which I'm a part.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
plz suggest any links for creating web widgets.
|
|
|
|
|
Google would be my first guess.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
How do I address a home folder in javascript?
like from a sub directory, I would want to open a document from the directory, by giving a relative path.
document.open("~/myfolder/mydoc.htm");
To be precise, I'm generating the script itself. like
obj = "<a href="~/myFolder/mydoc.htm">click";
</a>
More clarifications
Home: Webroot
Where I am now : Webroot/MyPages/MyLittlePages/SPage.htm
Where I am now : Webroot/MyPages/MyBiggerPages/SPage.htm
Where I want to go: Webroot/TargetPage/Tpage.htm
From SPages, I want to open a doc in TargetPage. And I'm writing a common script generator that gets added as inner HTML. So no matter where I am, I should be able to call the script that expands the code & be able to open the doc.
here the "~" doesn't work. So everytime I'm hard coding the rootweb address. That totally sucks. Anybody help.
Thanks.
modified on Friday, February 27, 2009 5:35 AM
|
|
|
|
|
No, ~ is a home directory. The root folder is just the slash /
|
|
|
|
|
Yes, thanks I meant the home folder. But "~" doesnt seem to work. So that's the way we do in Javascript?
|
|
|
|
|
There is no special way to do it in JS - it uses exactly the same URLs as anywhere else on a web page. In this instance I suspect that you don't need to specify ~ at all - this is a syntax that has fallen out of favour and must be followed by a username (~/ just refers to 'a home' directory, not the web root directory, which is /).
|
|
|
|
|
I have a table as below, I would like to insert:
<table width="50%" border="1">
<th>Title</th><th>Detail</th>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
1. An image on its right-side (its size can be defined by width & heigth)
2. The same above but can add another subject below the image (text or a button)
Thank for any help
|
|
|
|
|
check out www.w3schools.com
They have tutorials tailored for beginners.
|
|
|
|
|
What's the problem exactly?
|
|
|
|
|
When I tried to insert the image on the right-side of the table, it appeared below that table!
<p>
<img src ="map.jpg"
align ="right" width="20" height="20"> (table)
</p>
|
|
|
|
|
<table>
<tr>
<td>
Whatever you talk
</td>
<td>
Your image, button here.
</td>
</tr>
</table&tg;
|
|
|
|