The Wayback Machine - https://web.archive.org/web/20090301073601/http://www.codeproject.com:80/script/Forums/View.aspx?fid=1640
Click here to Skip to main content
5,932,865 members and growing! (16,584 online)
Announcements
* Bold indicates new messages since 21:35 28 Feb '09
BullFrog Power
Advanced Search
Sitemap

Web Development


Home > Forums > Web Development

 Msgs 1 to 25 of 789 (Total in Forum: 26,492) (Refresh)FirstPrevNext
AdminHow to get an Answer to your QuestionadminChris Maunder17:35 23 Mar '07  
For those new to message boards please try to follow a few simple rules when posting your question.
  1. Choose the correct forum for your message. Posting a C++ question in the Web Development forum will end in tears.
  2. 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.
  3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
  4. Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
  5. 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.
  6. Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
  7. Please do not post links to your question in one forum from another, unrelated forum (such as the lounge). It will be deleted.
  8. Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
  9. If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
  10. No advertising or soliciting.
  11. 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

QuestionUsing Javascript to Change Image Title AttributememberGinozzzz18hrs 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
AnswerRe: Using Javascript to Change Image Title AttributememberGinozzzz15hrs 32mins ago 
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.
GeneralRe: Using Javascript to Change Image Title AttributesitebuilderShog911hrs 36mins ago 
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.


QuestionInternet Explorer 7 Tabsmember.NET Enthusiast22hrs 46mins ago 
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
QuestionISAPI + ApachememberBram van Kampen15:22 27 Feb '09  
Does anyone know,does Apache support the ISAPI interface.

Regards

Smile

Bram van Kampen

AnswerRe: ISAPI + ApachememberCurtis Schlak.20:09 27 Feb '09  
mod_isapi[^]

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty

QuestionBHO with cookiesmembertsahiB8: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
NewsMessage Automatically Removedmemberpetermechele7:27 27 Feb '09  
Message Automatically Removed
QuestionJS and PHP but only one object definitionmembersortegrip6: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.
Questionondrop eventmembercooltoad1233:36 27 Feb '09  
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.
AnswerRe: ondrop eventmemberCurtis Schlak.5:20 27 Feb '09  
Short answer: Let Me Google That For You[^]

Long answer: Read the Mozilla Event API documentation[^]. Then, when you see that ondrop doesn't exist, use a cross-browser JavaScript toolkit.

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty

GeneralRe: ondrop eventmembercooltoad1235:36 27 Feb '09  
I have tried both short and long answer before asking questionSmile. That's why i asked if there is any other solution Smile.
GeneralRe: ondrop eventmemberCurtis Schlak.5:47 27 Feb '09  
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

QuestionHow to Create web widgets with ASP.net ?memberrakesh.d.cse15:41 26 Feb '09  
plz suggest any links for creating web widgets.
AnswerRe: How to Create web widgets with ASP.net ?memberExpert Coming21:59 26 Feb '09  
Google would be my first guess.

The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

QuestionAddressing the *Home* folder - javascript [modified], Yes question revamped.memberSmith#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.

Beer

modified on Friday, February 27, 2009 5:35 AM

AnswerRe: Addressing the Root folder - javascriptmemberJohnny ²21:44 26 Feb '09  
No, ~ is a home directory. The root folder is just the slash /
QuestionRe: Addressing the Root folder - javascriptmemberSmith#23:58 26 Feb '09  
Yes, thanks I meant the home folder. But "~" doesnt seem to work. So that's the way we do in Javascript?

Beer

AnswerRe: Addressing the Root folder - javascriptmemberJohnny ²23hrs 2mins ago 
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 /).
QuestionCan I insert image & button on the right-side of a table?memberTHA20003: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>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</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 D'Oh!
AnswerRe: Can I insert image & button on the right-side of a table?mvpled mike5:39 26 Feb '09  
check out www.w3schools.com

They have tutorials tailored for beginners.
AnswerRe: Can I insert image & button on the right-side of a table?memberSmith#7:25 26 Feb '09  
What's the problem exactly?

Beer

GeneralRe: Can I insert image & button on the right-side of a table?memberTHA200011:09 26 Feb '09  
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>

GeneralRe: Can I insert image & button on the right-side of a table?memberSmith#0:02 27 Feb '09  

<table>
<tr>
<td>
Whatever you talk
</td>
<td>
Your image, button here.
</td>
</tr>
</table&tg;


Beer

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web11 | 2.2.1042 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use