Solved

onclick button

Posted on 2014-03-08
12
142 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 110

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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 110

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
 
LVL 110

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 110

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 110

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 110

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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
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)

728 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