PHP script calling another but staying on same page

Hi,
Im thinking of writing an additional PHP page, that has a link to another PHP page, to do an insert. On the current PHP page, I have a counter which I would want incrementing after the 2nd PHP script is called, but don't think its possible?
I'm saying this as I will need an anchor to another script which when called, will load another PHP script - which will do the insert, but take me away from the current page.
So basically, I want to stay on the first PHP script showing a counter, click to call another PHP script, but all the user will see is a counter increment.
Here is what I have thought will not work:
<code>
echo "<br><span class=\"style1\"><a href=\"./../Test/count.php\"><img src=\"./Up.JPG\"></a>";
</code>
Thanks in advance...

Hi,
got a bit further now in that i'm calling the php script through Ajax successfully, but, got the issue where i am getting the same value sent to the script (dataString):
source script:
<script type="text/javascript" >
$(function()
$(".submit").click(function()
  var likeid = $("#likeid").val();
  var dataString = 'likeid='+ likeid ;
  var locurl = "./../Test/it.php?randval="+Math.random();
  $.ajax({
   type: "POST",
   url: locurl,
   data: dataString,
   success: function()
    $('.success').fadeIn(200).show();
    $('.error').fadeOut(200).hide();
  return false;
</script>
target script (it.php)
<?php if(!$_SESSION) { session_start(); } ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
</head>
<body>
<?php
$_SESSION['name']=session_id();
$sess=session_id();
$likeid=$_POST['likeid']; <----------------------always the same value
if($_POST)
  $result2 = mysql_query("INSERT INTO Test (value, sess) VALUES ('$likeid', '$sess')")
  or die(mysql_error());
?>
</body>
</html>
what i get is the same value for $likeid on every call from the source script. In the source script i have:
<form method="post" name="form1">
<input type="hidden" name="likeid" id="likeid" value="CAR79668"/>
<a href="#"><img src="./Up.JPG" border="0" class="submit" onclick="change11('CAR79668');"></a>
<b id="CAR79668" value="2">2</b> </form> </span>
<form method="post" name="form2">
<input type="hidden" name="likeid" id="likeid" value="CAR79669"/>
<a href="#"><img src="./Up.JPG" border="0" class="submit" onclick="change11('CAR79669');"></a>
<b id="CAR79669" value="2">2</b> </form> </span>
Why does the same value of CAR79668 get passed to the target script on every call?
Thanks.

Similar Messages

  • Top 25 Played Playlist updates on computer, but stays the same on iPhone

    Hey guys,
    I'm hoping someone else can help me. My iTunes Top 25 playlist updates just fine on my iMac, but not on any of my iPhones/iPods.
    It has stayed the same constantly for about a year now, and I'm wondering if it's a file in the iTunes library that is messing it up? (Maybe something in the actual iTunes folder in Finder)
    Thanks for any help/pointing in the correct area!

    Um, bump.

  • Pass parameter to another page and stay on same page?

    Greeting EveryBody,,,
    as u can see from the subject
    im trying to pass parameter from one page to another but i want to stay on the original page???
    can be done or not? and how?
    examples are welcomed
    thanx in advance
    best regards
    carlito

    i have three pages displayed all by <frameset>
    and i want to pass parameter from one page to another without going to any page!!! i.e. staying on the main page
    hope it clear now....
    best wishes

  • Sims 3 quit unexpectantly but stayed the same resolution!

    My Sims 3 quit unexpectantly and my screen stayed the same resolution. There are black bars on the side of my screen from the resolution that I was playing in the Sims. I have tried restarting the computer and going into Sims to change the resolution to the highest settings (that match up with the resolution of my computer). The Sims 3 now works with my whole computer screen but my desktop is still obscured! Please help!

    Try the following,
    TIFFEncodeParam tep = new TIFFEncodeParam();
    // Create {X,Y}Resolution fields.
    TIFFField fieldXRes = new TIFFField(0x11A, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_X, 1}});
    TIFFField fieldYRes = new TIFFField(0x11B, TIFFField.TIFF_RATIONAL,
                                        1, new long[][] {{DPI_Y, 1}});
    tep.setExtraFields(new TIFFField[] {fieldXRes, fieldYRes});

  • Click on URL in email, open new tab in browser, BUT stay in same Thunderbird email

    There used to be a way to click on a link (URL) in an email that would open a new tab/window in the browser (Firefox), BUT stay in Thunderbird - similar to what Ctrl-Left-click does in Google search results in Firefox.
    My work flow is usually to open several links, staying in Thunderbird and then when I'm done - go to Firefox to look at them all. E.g. I get a stackexchange weekly summary email, click on all the topics that look interesting and then, when I'm done selecting them, go look at them in Firefox.
    I don't want to be forced to jump back and forth for every link, one at a time. This used to work.
    Is there a preference or add-on that will do this - or anything else?

    I'm not aware of any complete reference to all preferences that offer a full explanation of what each does, what the Value means and how to use in a problem-oriented fashion.
    But the list below does help:
    http://kb.mozillazine.org/Category:Preferences
    http://kb.mozillazine.org/About:config
    http://kb.mozillazine.org/About:config_entries
    http://www-archive.mozilla.org/unix/customizing.html#ui
    http://preferential.mozdev.org/preferences.html
    there is also a postscript module used by eg: linux
    http://kb.mozillazine.org/PostScript_Module
    Margins are set up here:
    File > Page Setup > Margins & header/Footer
    or via File > Print Preview > Page Setup button
    Helpful hints:
    if you have Margins (millimeters)
    and set eg: Bottom margin as 20.0
    then look in config editor, you will see:
    print.printer_XX.print_margin_bottom; Value = 0.787500023841858
    This seemed odd at first. All Values in config were being converted to inches represented in a decimal format.
    If you ever need to change the margins from millimeter to inches:
    Print.printer_xx.print_paper_size_unit Value: = 1
    Change the Value to 0 (zero) to get inches
    If you change the Value to 0 for inches and then reopen:
    File > Page Setup > Margins & header/Footer
    you will see the Bottom margin has auto changed from 20.0 (mm) to 0.8 (inches rounded up), so although the display is different in File > Page Setup > Margins & header/Footer tab, the actual information in config preferences remains unchanged as it is saved in decimal inches format used by US as default.
    if using millimeters then the paper size would be A4 210 x 297 mm.
    Although looking in the config preferences it will say paper width 8.50 and paper height 11.00.
    Usually, you can change the paper size when you select to Print and look in Print Properties. I'm in UK and using millimeters so get A4; the US uses Letter 8½ x 11 inches.
    So I can see how it could be confusing to anyone using millimeters and then sees, what appears like wrong data in preferences.

  • On most of the web pages I open, Firefox hangs and gives me this error:Unresponsive script. I can open the same page w/Google Chrome, and don't get that error.

    I've performed all the fixes multiple times, and I keep getting this error. I don't get the error on the same page with either IE or Chrome. Sorry to say, Chrome is now my default browser...

    Does it mention the name of the script or its chrome protocol URI?
    Create a new profile as a test to check if your current profile is causing the problem.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Filtering a Report on the active record of another Report on the same page

    Hello,
    I have a Form and Report on the same page in an APEX app. The interactive report is used for sorting/filtering etc. and the Form is used to present the data for one record at a time, as well as allow updates in selected fields. This was done using the wizards, the little 'edit' button is clicked to change the form to the selected record.
    I also have (or want to have) a second non-interactive report on the page, which displays some records based on the record of the main report that is currently selected and appearing in the form.
    I tried doing a simple 'SELECT fields WHERE link field is equal to main report', but it always says no data found.
    Basically, I need to be able to have a query for the second report that says 'SELECT these fields WHERE the site is equal to the site currently being displayed in the form'.
    When the little pencil/paper 'edit' button is clicked on a report, does this set some ActiveRow or something like this that I can use to filter the second report?
    As you can tell from this post, I am in my database skill infancy, and any literature/pointers on how to achieve this (outside of MS ACCESS...) would be appreciated.

    Okay, I have somewhat got my head around Column Links, and have put the key link field into the URL:
    The value is P4_MDF, and in this URL example it has taken the value of 'WLAH01'
    f?p=880:4:3924084145794812::NO::P4_MDF,P4_ESA_CODE,P4_SITE_NAME:WLAH01%2CWLAH%2CWYRALLAH
    Now I just need to work out how to use this value in the URL to filter the classic report.
    I have used this query:
    SELECT *
    FROM
    "MACHINE_INFO"
    WHERE CCP = :P4_MDF
    As CCP in the report im trying to filter is the same as MDF in the IR that I am clicking the Column Link
    This is the Debug for the 2nd 'filtered' report (which filters everything)
    0.09: show report
    0.09: determine column headings
    0.09: parse query as: EXPAT
    0.09: binding: ":P4_MDF"="P4_MDF" value="WLAH01"
    0.09: print column headings
    0.09: rows loop: 15 row(s)
    I'm slowly getting the hang of this, any assistance would be great!

  • Use a Jump Menu to Make Selection and stay on same page.

    I have a form that you select a ID from a drop down list
    click submit, and then are redirected back to the same page with
    the results of a query based on the selection from the drop down
    list. I want to change this so the user doesn't have to click
    submit... I want my drop down list to act as a jump menu. How do I
    get my dropdown list to act like a jump menu, which essentially
    submits the form, and posts the results below?

    2 ways, both use javascript (you can't do it with just cf):
    1) add an onChange attribute to your select with
    'this.form.submit()' as
    value. this will submit the form, refresh the page and show
    your results
    - just as if user clicked your 'submit' button. be careful,
    though, if
    you are checking for existence of the submit button in your
    action page
    - it won;t be there since it has not been clicked.
    2) you can also employ some ajax features to submit your form
    asynchronously, 'behind the scenes', and show results without
    refreshing
    the page. CF8 has built-in ajax js functions and tags to do
    it,
    otherwise look into ajaxcfc by rob gonda or jQuery or other
    js framework
    that has these features.
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Appears I have downloaded the latest version of itunes, but stays the same

    I have been trying to update to the latest version of itunes, and after I click on "download version 11" it quickly says "thank you for downloading the latest software". No install process appears to happen, and i go to open itunes and its still a previous version. I have tried updating through the control panel as well, but it has not worked. I can't seem to connect to my son's itouch with the current version on my pc.

    What version of iTunes is actually installed?

  • Html Portlet links displaying in another portlet on the same page

    I have seen similar posts but no detailed explaination of how this is done.
    I have an html portlet with links whose content I would like to display in an inline rendering portlet on the same portal page. How can I pass the link url from the html portlet to the inline rendering portlet?
    Thanks,
    Robyn

    If your environment is fairly static, you can handle this easily.
    The link in your HTML portlet must refer to the page URL of the portal page on which the HTML portlet resides (which changes from portal page to portal page), to which you need to append the parameter that your "inline" portlet (under which I'm not sure what you mean) reads:
    <a href="http://<portal_page_url>&my_param=value">click here</a>Is this close to what you're willing to do?

  • Using Link from one region as parameter to another region on the same page

    I have a page with two regions.
    Region 1 has a list of items that are dispalyed as links
    Clicking on a specific item I need to have a calendar report displayed using the value of the link for eg
    Region 1 Region 2
    abc Calendar based on the link selected in region1
    def
    xyz
    How is this possible

    I spent quite a few hours after this was posted trying to figure it out and I did.
    Select Mailbox > Export Mailbox.  This asks you a location to export the mailboxes to.  It just uploads the exported mailboxes into Dropbox. 
    Then change the User that I want to import the mailboxes into. Select Import and select the location of where you placed the folder in Dropbox. This then imports the mailbox into a folder called Import. You then drag and drop the copied mailboxes from the Import folder to the folder in the structure you have.  If you decide to delete the folders from the import folder list, do this.  You can also delete the copied folders from Dropbox if you wish.
    Took a while, but I got there and I'm happy now....

  • Dynamic dropdown based on user selection of another dropdown on the same page

    hi all, ok, I have a table which contains use data, a name,
    and a userID. for the example lets say "Simon Bullen" and my userID
    is "999".
    on a form I have, there is a dropdown box, which is dynamic
    from this table, and allows me to select Simon Bullen, however, I
    have a hidden field on the form, which when the user selects "simon
    bullen" the hidden field populates with the appropiate U number
    from the same table.... no i thought this would do it:
    <cfquery name="userNumber" datasource="userList">
    SELECT userNumber FROM dbo.Users WHERE Name =
    <cfqueryparam value="#form.Name#">
    </cfquery>
    and then my dynamic form field (hidden) would reference to
    this query....
    but it doens't work, could somebody please enlighten me? I'm
    hoping its something silly
    Thanks in advance

    You could make the value of the option the UserID and the
    option display the name.
    If that isn't what you need, I think you'll need some
    javascript to populate your hidden field based on what is chosen in
    the select.
    I think you can modify this:
    http://www.javascriptkit.com/javatutors/selectcontent2.shtml
    ...to populate your hidden field instead of a new select
    list.
    If there's a way to do that without JS I'm not aware of it.
    A third possibility: look up the UserID (based on the name
    chosen) after the form is submitted then do with it whatever you
    need to.

  • After inserting data,want to stay on same page

    probem solved
    Edited by: rommy on Jul 8, 2009 12:56 AM

    Hi DS,
    I use a javascript call to do what you describe all the time.
    Since I use this all the time I embed the actual full javascript in Captivate's "standard.js" file. This is the full script:
    function openBrWindow(theURL,winName,features)
       window.open(theURL,winName,features);
    I save the standard.js file. On my workstation this is the path to that file:
    C:\Program Files\Adobe\Adobe Captivate 5\Templates\Publish\standard.js
    Now I can call the script anytime.
    Here's how I configure the click-box:
    If you look at Rick's picture (thanks Rick) in the Properties control menu under Action, for On Success, choose Execute Javascript.
    Next Click the Script Window button, this opens up a blank window. Since you are just calling the javascript, you don't need to put the whole script in the window. Here is an example:
    javascript:openBrWindow('myURL.html','thewindowname','height=800px,width=1000px,scrollbars =yes');
    Ths example opens a window 800px tall and 1000 px wide with scrollbars. You can add additional attributes if you like. Make sure the URL is correct and has the correct path and if you have more that one of these on a slide the window name will need to be different. (If this persists from slide to slide you don't have to have them all as unique, only for more than one on a slide.
    Now, click the little down arrow beside the Script Window button. This produces a little drop menu (as illustrated on Rick's image). Make sure you select "Top" and turn off the "Continue Playing the Project".
    This control makes the newly spawned window appear on the top of the project and stops the playing of the slide. You can set other options in Properties to turn off or on captions as needed.
    I hope this helps,
    TPK

  • Forcing the opendoc call to open in the same page when using web elements

    Hi,
    I'm using the WE Submit web element to send an opendoc call to BOE, I'm calling the same report and re-running with new search criteria.
    Is there a way to force the report to open in the same viewer as opposed to opening a new window?
    Thanks in advance,
    Angela.

    hello Angela,
    i assume that you're using a WETargetPath function along with the submit. normally the submit function should then open the report in the same window.
    for example, if your report has an ID of 12134, then the following code should open the same report in the same window
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "");
    WESubmit ("S1", "Button", "GO", path, '')
    you can also use the last parameter in the WETargetPath to specify a location...using "Same" will force opening in the same window, while "New" will force a new window.
    stringvar path:= WETargetPath ("rpt", "ID", "12134", "weWindow=Same");
    WESubmit ("S1", "Button", "GO", path, '')
    If you've downloaded the latest version of webelements from [here|http://www.sdn.sap.com/irj/boc/webelements] there's a "submit methods" report in the download that you can publish and have a look at the various options.
    cheers,
    jamie

  • Showing content in another region on the same page using url

    Hello Experts,
    I have a page with two region, say region A and region B. Region B is a sql based report that shows rows of information about a set of files with the first column rendered as an URL for the actual file itself. On clicking this url the file content is displayed in the same window replacing the existing content. I would like for this file content to be shown in the region A, without replacing the entire window. Is this possible?. I tried assiging a static id to region A and use it in the url, however that is not working and i am still in the process of figuring this out.
    thanks
    Seetharaman

    When you click on the link , get the URL and show the link in an iframe
    Suppose your report links are rendered like(HTML code of the report)
      &lt;td[headers=&quot;FILE_LINK&quot;]&gt;&lt;a href=&quot;http://myurl:8080/blah/blah&quot;&gt;Blah&lt;/a&gt;&lt;/td&gt;*Have an onload JS which causes clicking on the file link to generate an iframe and load it inline (I would have chosen a jQuery modal dialog over an inline display)
    $('td[headers="FILE_LINK"] a').each( function(){
      url = $(this).attr('href');
      $(this).attr('href','javascript:void(0);');
      t = $(this);
      $(this).click( function(e){
        e.preventDefault();
        t.after('<iframe src="'+url+'"> </iframe>');
    });<i>Note: modify the link field selector to match your report column links</i>
    As an additional comment: Showing an entire html page(or a file) inline in a report might not be visually appealing, try opening it as a modal popup.

Maybe you are looking for