 |
 | How to get an Answer to your Question |  | Chris Maunder | 17:35 23 Mar '07 |
|
 |
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a C++ question in the Web Development forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- If you are posting source code with your question, place it inside <pre></pre> tags, or click the "Ignore HTML tags in this message" check box.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers, Chris Maunder CodeProject.com : C++ MVP
|
|
|
|
 |
 | Using Javascript to Change Image Title Attribute |  | Ginozzzz | 18hrs 56mins ago |
|
 |
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
|
|
|
|
 |
 | BHO with cookies |  | tsahiB | 8:42 27 Feb '09 |
|
 |
hi all I have a BHO application (C#) anyone knows if I can use cookies with BHO ? if so, how? thanks
|
|
|
|
 |
|
 |
Message Automatically Removed
|
|
|
|
 |
 | JS and PHP but only one object definition |  | sortegrip | 6:38 27 Feb '09 |
|
 |
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
|
|
|
|
 |
 | How to Create web widgets with ASP.net ? |  | rakesh.d.cse | 15:41 26 Feb '09 |
|
 |
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
|
|
|
|
 |
 | Addressing the *Home* folder - javascript [modified], Yes question revamped. |  | Smith# | 7:17 26 Feb '09 |
|
 |
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 /).
|
|
|
|
 |
 | Can I insert image & button on the right-side of a table? |  | THA2000 | 3:33 26 Feb '09 |
|
 |
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;
|
|
|
|
 |