Could someone point me in the right direction on how I could go about allowing a user to click a link on a PHP While Loop created MySQL table and pass that records info to another page. I've looked through all the similar questions and none answer mine. I am new to this type of programming.
Ultimately what my ideal scenario would be is this: Currently I have a list of data created with a While Loop. I would like a user to be able to click a text link that says REPORT ERROR. This in turn would take them to an error reporting form and populate a column of spans using getElementbyid... innerhtml. I know how to populate data with PHP on the same page but going to a new page is a different story.
Also as a newbie to Stackoverflow too, am I able to hire someone to do certain things for me?
pass data.
you can simply give the link of that page where you want to send your data and with a question mark you can pass whatever data you want to pass .if you want to pass multiple data use & between the data values. like below. i hope this will help you.
Related
I'm working on a website where you can see buildings on a map and where users can click on a table row (1) (where informations about the building is shown) to get redirected to the map page. Additionally, and thats where i'm stuck, the clicked table row should appear on the first page (2).
So the question is: how can i display the table row that just got clicked, on another page?
thanks for your help!
Pass the index of the row that is clicked as props
Even if it's difficult to answer to this question since it's very generic, I'll try to assume that you are missing the basic approach and need a starting point on how resolve this. Once you clicked on the row, you can pass the data to the new URL. Assuming that you are calling a new page, the row should be wrapped in an anchor element and in this case the data can be passed with a GET request, included in the URL. You can have a look to the W3school website page talking about GET method
to learn more about it.
If you are trying to do this as a single page application with react instead, start looking at React documentation on how components and props work to pass props down to other components.
Hope you find this helpful!
I'm currently stuck with how to implement something into a database. I need multiple values to be carried over to a general page. To explain more in depth, let me tell you what I have done, and where I'm stuck.
I'm creating a New General Page form. I have a special offer form box generator, which upon pressing a button creates a new form consisting of six fields. For each new page, you can generate an infinite amount of offers. The problem I'd face if I give each offer an ID which gets imported to the general page is that it might either take ID=1 for one page and ID=2 for another page, or ID=1 and ID=2 will both be one every new page generated. What I need to do is get, for example, 4 offers for one page sent to the database, and when the New Page is generated it'll have the four offers called. How would I go about creating a database for them?
Momentarily my table for it looks as such:
||idOffer||price||idDays||idPersonQuant||offerInfo
where ID Days and ID Person Quantity is unique to the individual offer.
I know I have to get all of the offers under one ID which will be unique to every page, but how do I get various amounts of offers under one ID?
For those who want to get a look at the script, here it is: JSFiddle
It works, but not on JS Fiddle.
If there is any confusion, I will post a JSFiddle with my code for the entire form and how it's going to post stuff.
Thanks in advance! Been stuck on this for ages :/
If you want multiple "offers" under one ID, you can create a new table called offerGroup (or similar). Entries in this table will correspond to one "page", so when a new page is created, there should also be an associated offerGroup. The table wouldn't need to be complicated at all, just a primary key:
||idGroup
In the "offer" table, you can then reference the id of the group that the offer belongs to.
||idOffer||price||idDays||idPersonQuant||offerInfo||**idGroup**
This solves your problem where you might have anywhere from one to infinity offers on one page. I hope I understood your question correctly.
I need some help with oracle apex. The thing which I want to do is the following:
I have table with some data about people. So each row describes exactly one human. And I want to show some more information about certain human. For example, list of shops he or she has visited. Such data provided by other tables.
I see it in this way: right click on table with people on certain row -> select option (what kind of info to show) -> execute stored procedure and show new page with data table (e.g. list of shops). But how can I implement it?
I've already found this plugin. Now I can execute some JavaScript function after right-click. But how can I execute stored procedure and show new page?
I'm new in apex, any help would be appreciated.
You're trying to reinvent the wheel. You're new to apex. Have you taken a good look at the documentation?
Start out where everyone else has to start: at the beginning. Report + form. Column links.
There is ample help available to someone new to apex.
The 2-day developer guide, running you through some of the
basics of apex and a good familiarization.
Get a workspace at apex.oracle.com
Each workspace starts with the sample database application, based on
products and customers. You can view and edit this application and
thus you can glean plenty of information from it.
Furthermore, there are the packaged applications, many of which offer
good basic solutions to common situations. Again, you can glean a lot
of information on them, and they are even editable after you unlocked
them.
After you are familiar with the basics, you can look further ahead. What you are asking is simply too much for someone new to the matter. You even want to implement a jQuery plugin straight away. You're talking ajax. It's great if you know those subjects and they'll be of plenty of value to you, but it just seems you don't even know how to present and fetch your data.
A good start would be to make a report and a form. In the form you can then add some classic (or an interactive) report(s) to represent associated data.
It's possible. First of all, assume that each row contains unique identifier ID. You have to add hidden item to the page which would contain additional info about certain row. Let's name it P1_ID. Then add the following JavaScript code to page which contains initial data (in example from question, page with table with information about people):
function TestFunction(action, el, pos) {
var id = $(el).children('td[headers="ID"]').text();
var href = 'f?p={APPLICATION ID}:{PAGE_NUMBER}:&SESSION.::::P2_ID:'+id;
window.location = href
}
Function name should match name in plugin settings. Example: link
Replace APPLICATION_ID and PAGE_NUMBER with actual values according to application. PAGE_NUMBER is the page number which contains additional info about row.
Then you can add some reports to the page with additional info and use ID parameter to select information about certain row.
The only problem is that plugin mentioned in question stop working after table refreshing. For example, if we filter data in table then no menu on right click will be shown. I don't know how to fix it for now. Any ideas?
I have 2 pages say index.html and 2ndPage.html.
index.html has two textboxes and a button. Now i want to enter some data in the textboxes and received the data in 2ndpage.html. I want to use only javascript. dont want to use query string. Only post or get method. Is it possible? Please help me or guide me how to send and receive data form one page to another in javascript/jquery.
Well, using javascript or jquery you can accomplish that. Check jQuery's AJAX function. Otherwise, learn PHP as already mentioned in the comments.
using localStorage or sessionStorage you can do this. here is a link, which will help you. i just take few css property from one page to another page. but you can take input value also.
Taking css property from one html page to another page
or if you are taking care of old browser also then javascript Location object is the way to go.
I have a share point survey. When we responding to the survey, as we know, it will open NewForm.aspx. this page contains a ListFormWebpart in which questions from survey list will be displayed.
Now, i need to add few labels before the questions and these label values should be prepopulated from query string. What i am trying to achieve from this is, i wll created a link
with some values in query string and send to specific users. different users might have different values in query string. Whenever they click on the link, it should open the survey with prepopulated label values along with questions in list.
I am not sure, how to do it. I have tried to add some html control to web part(using share point designer) and through JavaScript i have tried to set query string values. Then i tried to put asp controls and trued. it didn't work. I am trying since last 2 days. No progress. I am using SharePoint 2003, WSS2.0
Can anybody, please help me to implement this solution.
You may find it easier to create a webpart with a custom form that enters data into the survey list.
The survey lists are useful as they are quite flexible, but your solution will likely make it hard to change your list in future. That means that a webpart specific for this survey may be a valid design decision for you.
An issue with your current implementation is that passing values specific to different users through the query string does not give you any guarantee that enterprising users will not change those values.
This may not really be an issue depending on your situation, but a custom control will allow you to query the current user and make decisions that way.
I have written some Java Script for reading query string, parsing and assigning values to controls based on their ControlID. I have used Content Editor Web Part to add this JavaScript to the Existing Survey page. Then this script has done job of prepopulating the fields.