Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

url problem

 
Samarth Barthwal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody,
I made the following applet but it gives me 3 error for the variable url1.why is it so?





I get the following errors:

1. url is already defined in init().
2. cannot find symbol variable getDocumentBase.
3. cannot find symbol url1.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error messages are very much self-explanatory. Aren't they?

1. url is already defined in init().
You are tyring to define a variable called url twice, which is illegal.


Rename it to url1, this will solve problems (1) & (3)

2. cannot find symbol variable getDocumentBase.
getDocumentBase() is a method. So the proper way to call it is
 
Samarth Barthwal
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Mani
 
Skool. Stay in. Smartness. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!