• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Copying code from .html to .jsp produces unexpected results.

 
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have addaccommodation.html which is a simple form to take the details of an accommopdation.



Which produces this SEE ATTACHMENT Add Accommodation... Notice the map feature to set the lat and long.

Now, once an accommodation has been added I want to be able to edit it. So I copy and paste the code from addaccommodation.html to editaccommodation.jsp. Then I add the EL to use the parameter to prefill the form to give me this SEE ATTACHMENT Edit Accommodation

The code for editaccommodation.jsp


Now my problem is that the map is not appearing on editaccommodation.jsp and I'm struggling to understand why as its copied and pasted from a working page (map shows on addaccommodation.html)

Any help with this to get the map showing on editaccommodation.jsp would be greatly appreciated

Regards

TH
addscreen.png
[Thumbnail for addscreen.png]
Add Accommodation
editscreen.png
[Thumbnail for editscreen.png]
Edit Accommodation
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, you should have to have tow files. You can use the same file for the initial fill-in and the later edit. That'll solve one maintenance headache.

As to why it isn't working. Do a View Source at the browser for the working and the non-working version, and see that the difference are.
 
Tom Hilliard
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
missing from editaccommodation.jsp! FACEPALM! God knows how that ended up like that. I had sat and gone through the source of both but obviously overlooked the standard declarations (or whatever the <meta> bit is).

Cheers Bear, works as expected now.

Regards

TH
 
Tom Hilliard
Ranch Hand
Posts: 39
Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And I did question my method when I was copying code... Can I do this once is what I asked myself. Could you point me to a reference I can have a read on? Im guessing I can create the form once and call it as and when?

Cheers

TH
 
Everybody's invited. Even this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic