Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7709297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:49:34+00:00 2026-06-01T00:49:34+00:00

<form> <table> <tr> <td> <input type=tex id=arheading name=arheading value=Article Heading onfocus=if (this.value == ‘Article

  • 0
<form>
        <table>
            <tr>
                <td>
                    <input type="tex" id="arheading" name="arheading" value="Article Heading" onfocus="if (this.value == 'Article Heading') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Article Heading';}" />
            </td>
                <td>
                    <select id="plaetype" name="placetype">
                        <option selected="Place Type">Place Type</option>
                        <?php
                        include 'ini/configs_adm.php';
                        $result_adm = mysql_query("SELECT * FROM places");
                        while($row_adm=mysql_fetch_array($result_adm))
                        {
                           echo '<option value="'.$row_adm['places'].'">'.$row_adm['places'].'</option>'; 
                        }
                        ?>
                    </select>
                </td>
                <td>
                    <select id="country" name="country">
                    <?php
                       include 'ini/configs_adm.php';

                       $result_adm = mysql_query("SELECT * FROM countries");
                       while($row_adm=mysql_fetch_array($result_adm))
                       {
                       echo '<option value="'.$row_adm['country'].'">'.$row_adm['country'].'</option>';
                       }
                    ?>
                    </select>    
                </td>
            </tr>
        </table>       
    </form>

Above is the code that i want to load on my index page without refreshing or without navigation through AJAX.

and the ajax code i tried to is………

var loadedobjects = ""
var rootdomain = "http://" + window.location.hostname

function ajaxpage(url, containerid) {
    var page_request = false
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
        page_request = new XMLHttpRequest()
    else if (window.ActiveXObject) { // if IE
        try {
            page_request = new ActiveXObject("Msxml2.XMLHTTP")
        }
        catch (e) {
            try {
                page_request = new ActiveXObject("Microsoft.XMLHTTP")
            }
            catch (e) {
            }
        }
    }
    else
        return false
    page_request.onreadystatechange = function () {
        loadpage(page_request, containerid)
    }
    page_request.open('GET', url, true)
    page_request.send(null)
}

function loadpage(page_request, containerid) {
    if (page_request.readyState == 4 && (page_request.status == 200 || window.location.href.indexOf("http") == -1))
        document.getElementById(containerid).innerHTML = page_request.responseText
}

function loadobjs() {
    if (!document.getElementById)
        return
    for (i = 0; i < arguments.length; i++) {
        var file = arguments[i]
        var fileref = ""
        if (loadedobjects.indexOf(file) == -1) { //Check to see if this object has not already been added to page before proceeding
            if (file.indexOf(".js") != -1) { //If object is a js file
                fileref = document.createElement('script')
                fileref.setAttribute("type", "text/javascript");
                fileref.setAttribute("src", file);
            }
            else if (file.indexOf(".css") != -1) { //If object is a css file
                fileref = document.createElement("link")
                fileref.setAttribute("rel", "stylesheet");
                fileref.setAttribute("type", "text/css");
                fileref.setAttribute("href", file);
            }
        }
        if (fileref != "") {
            document.getElementsByTagName("head").item(0).appendChild(fileref)
            loadedobjects += file + " " //Remember this object as being already added to page
        }
    }
}

and the code that will call for AJAX function is…..

<ul id="admin_menu">
    <?php
    include 'ini/configs_adm.php';
    $result_adm = mysql_query("SELECT * FROM adm_tools");
    while ($row_adm = mysql_fetch_array($result_adm))
    {
        echo '<li><a href="javascript:ajaxpage(\'' . $row_adm['adm_menu_lnk'] . '\', \'contentbox\');">' . $row_adm['adm_menu'] . '</a></li>';
    }
    ?>
</ul>

My ajax code have loaded the page but the php script is not retrieving data from db

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:49:35+00:00Added an answer on June 1, 2026 at 12:49 am

    It looks like you might be missing the extract($row) function.

    That would look like:

    while($row_adm=mysql_fetch_array($result_adm))
    {
     extract($row_adm);
     echo '<option value="'.$row_adm['places'].'">'.$row_adm['places'].'</option>'; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a form with checkboxes like this: <input type=checkbox name=type[] value=1 />Fast Food<br>
Example, if I have <form name=blah> <input name=1/> <input name=2/> <table> <tr> <td> <unkown
How can I ensure that this does NOT open in a new window?? onclick=ob=this.form.table;window.open(ob.options[ob.selectedIndex].value)/>
Following is the command to fetch maximum salary form empsalary table in mysql select
I have a table for a contact form and this table contains another table
I have a table of input fields. The form will be used by inexperienced
hello i have a form like this <form id=ricerca enctype=application/x-www-form-urlencoded method=post action=><table class=inserisci_modifica> <tr
I have Form as <form name=selectdoctype method=post action= id=selectdoctype> <table style=border:none;> <tr><td colspan=2> (<span
I want a table that can submit value I try with form my problem
I am using the below code to select random answers in a form $('table').filter(function()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.