Solved

onclick button

Posted on 2014-03-08
12
131 Views
Last Modified: 2014-03-27
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
Comment
Question by:breeze351
  • 6
  • 3
  • 3
12 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39915324
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
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39915950
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
 

Author Comment

by:breeze351
ID: 39916129
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
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39916143
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
 
LVL 58

Expert Comment

by:Gary
ID: 39916153
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
 
LVL 58

Expert Comment

by:Gary
ID: 39916160
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39916171
+1 for Google Maps.  Easy to integrate and lots of built-in functionality.
0
 

Author Comment

by:breeze351
ID: 39916299
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
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39916305
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
 

Author Comment

by:breeze351
ID: 39918469
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
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39918507
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
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 39960104
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now