DIGIT-ARC read-only archive · snapshot: July 23, 2026

Basic javascript questions

8 posts · originally from https://geek.digit.in/community/threads/basic-javascript-questions.143207/

cute.bandar
cute.bandar Original post #1
Jul 1, 2011 at 2:31 PM
I am not learning javascript ATM , but want to know how to do a couple of things for a php project.

Problem 1.
This page: Zenfolio has a nice javascript effect. Click on 'send message' and via onmousedown event a method is called.
But this doesn't work if I save the source of the page locally and then run the local file. Why?

Exact Steps:
  1. save source of Zenfolio | G i a n m a r i o M a s a l a A r t w o r k s | Contact into a file (local.html)
  2. run local.html
  3. click on send message to see that javascript effect doesn't work.
abhidev
abhidev #2
Jul 1, 2011 at 2:38 PM
what effect is that......also have you downloaded the js files???
cute.bandar
Jul 1, 2011 at 2:40 PM
effect: just calls a function to rewrite the a href.
I didn't download the js files , but tried to set the paths right (relative to absolute)...Is there a way to find the exact relevant js file? so that i won't have to plough through the source code?
abhidev
abhidev #4
Jul 1, 2011 at 2:53 PM
onmousedown it just posts the form, hides it and then shows the message.

I didn't get what effect are you talking abt
cute.bandar
Jul 1, 2011 at 3:05 PM
onmousedown it just posts the form, hides it and then shows the message.
yes thats what I meant by effect. sorry for being confusing.

SO how do I get it working locally? can someone try it on their machine ?
abhidev
abhidev #6
Jul 1, 2011 at 3:20 PM
u just need to set the path of the js files correct...and that should work...also don't forget to host it on the server because for ajax to work it should be hosted on the server...also edit the js file and write the entire url '*gianmariomasala.zenfolio.com/zf/layout/layout.asmx'
cute.bandar
Jul 1, 2011 at 3:32 PM
ok I'll try...
btw how did you figure out it was posting using ajax ?