Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

onclick button

I have a page and what I want to do is after the user clicks on up/down/left/right I need to return to the same page.  Is there a way that I can use php in the java script?

To explain this better.  It's a list of addresses.  The page shows an entire block (north/south/east/west)  What I want to do is when they click on "Up", it will show the same info for one block north. The same would work for down (south), left (east) and right (west).
0
breeze351
Asked:
breeze351
  • 6
  • 3
  • 3
1 Solution
 
GaryCommented:
You can put PHP values into javascript, you can't run PHP at the browser with javascript.

Maybe if you gave a link to the page we may be able to help you.
0
 
Ray PaseurCommented:
Can you please show us a link to a page that does this?  It's doesn't have to be your web site, obviously, just something online that demonstrates what you're trying to achieve.  Thanks, ~Ray
0
 
breeze351Author Commented:
Web Site: langsystems.net
User: sales
Password: lsi

I have no problems with passing this information.  It is all test data.

After you login click on "Walk By Map"

Street #: 1300
Street Name: mad

What I want to do is add 4 buttons (West ,North, South & East).

When the user clicks on "North", reload the page with the same data for the previous block.  

As you can see from the data "echoed" at the top of the page,  I can figure out the information for the page that I need to load.

I'm worried that if I go to another page change the data and reload this page, what happens if the user hits the back button?

Is there a way I can reload this page without having to load another page?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ray PaseurCommented:
Let me try this question again...
Can you please show us a link to a page that does this -- something online that demonstrates what you're trying to achieve?
0
 
GaryCommented:
When the user clicks on "North", reload the page with the same data for the previous block.
That in itself goes against how someone would logically think looking at a map
Have your navigation buttons and a separate compass showing where north is.

What is the logic to know where you are going, how do you know what 'map' to load?

Is there a way I can reload this page without having to load another page?
No idea what you mean.
0
 
GaryCommented:
I'm thinking google maps would be a simple and better solution for you. (considering all the time you are putting into just this part of the website)
0
 
Ray PaseurCommented:
+1 for Google Maps.  Easy to integrate and lots of built-in functionality.
0
 
breeze351Author Commented:
Ray:
North is always on top.
East to the right.
South on the bottom.
West to the left.

As far as Google maps, they are not accurate.  I have a database and I know where stores/buildings are actually located.

Google gives you a general location.  This is particular true in major cities.  A building in NYC can have 3 addresses.  One on "8th Avenue" and the second on "14th Street" and the third on "15th Street".  

Also Google does not have all the locations that I am looking for.  They don't have side streets and their data is out of date.
0
 
Ray PaseurCommented:
I understand standard compass notation.  If you want something more accurate and up-to-date than Google's free data, please tell us your budget to buy mapping data.  Armed with that knowledge we may be able to suggest some paid providers.  Also, back to this:
Can you please show us a link to a page that does this -- something online that demonstrates what you're trying to achieve?
Have you ever seen any web site that does what you're describing?  Or are you asking for original research?
0
 
breeze351Author Commented:
I have the data and it's better than Google's!!!!
I'm working with brokers in NYC, Maryland, and Washington DC.

As far as a website that does this, nobody does.  We have a product.

I think I've figured this out by myself.

Can you tell me the problem with this code?

                  header("Location:Walk_Map_Display.php?
                              SEQ=$ROW2['SEQ'] &
                              STORE=$ROW2['STOREKEY'] &
                              ADDRESS=$ROW2['BNMB']
                              ");
Thanks
0
 
Ray PaseurCommented:
It would probably need to be constructed on a single line, so there are no line break characters, and the data fields would need to be URLEncoded.
0
 
Ray PaseurCommented:
Please see the Experts-Exchange Grading Guidelines which are part of the agreement we all make in this community.  You're required to explain a marked down grade.  Standing by for your explanation.
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 6
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now