Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Location
    Costa Mesa, CA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    colorpicker not working in page.

    I have an asp.net website and the asp.aspx page calls some php code. here is the top of the page down to the head tags.

    Code:
    <&#37;@ Page Language="VB" AutoEventWireup="false" CodeFile="adv_style_settings.aspx.vb" Inherits="users_adv_style_settings" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Advanced User Options</title>
      
        <script src="../iframe.js" type="text/javascript"></script>
          <script src="202pop.js" type="text/javascript"></script>
        <script type="text/javascript">
            function loadFrm(){
                    if (this.options[this.selectedIndex].value!='0'){
                        document.getElementById('myframe').style.display='block';
                        document.getElementById('myframe').src=this.options[this.selectedIndex].value+'/admin/admin.php?IFLM=&page=dir_style';
                    }
                    else{
                        document.getElementById('myframe').style.display='none';
                    }
                  
                  //document.getElementById('myframe').src='http://'+this.options[this.selectedindex].text;
                return false;
                  // 
            }
        </script>
           
    </head>
    Here is the actual source of the page rendered :

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head><link href="../App_Themes/default/_vti_cnf/default.css" type="text/css" rel="stylesheet" /><link href="../App_Themes/default/default.css" type="text/css" rel="stylesheet" /><title>
    	Advanced User Options
    </title>
      
        <script src="../iframe.js" type="text/javascript"></script>
          <script src="202pop.js" type="text/javascript"></script>
        <script type="text/javascript">
            function loadFrm(){
                    if (this.options[this.selectedIndex].value!='0'){
                        document.getElementById('myframe').style.display='block';
                        document.getElementById('myframe').src=this.options[this.selectedIndex].value+'/admin/admin.php?IFLM=&page=dir_style';
                    }
                    else{
                        document.getElementById('myframe').style.display='none';
                    }
                  
                  //document.getElementById('myframe').src='http://'+this.options[this.selectedindex].text;
                return false;
                  // 
            }
        </script>
            
    
    
        
    </head>
    <body>
        <form name="form1" method="post" action="adv_style_settings.aspx" id="form1">
        <div style="background-color:White;">
            <h1>Advanced User - Options.</h1>
            <br />       
            <b>Select your advanced site:</b>
            <select name="lstAdvanceSites" id="lstAdvanceSites" style="background-color:#EFEFEF;border-color:#898989;border-width:1px;border-style:Solid;font-size:8pt;padding:0px;">
    	<option selected="selected" value="0">- select -</option>
    	<option value="">www.breast-cancer-information.org</option>
    	<option value="http://www.build-muscles.net/links">www.build-muscles.net</option>
    	<option value="http://www.link-exchangers.com/links">www.link-exchangers.com</option>
    	<option value="http://www.mortgage-pros.com/links">www.mortgage-pros.com</option>
    	<option value="http://www.solutions-web-hosting.com/links">www.solutions-web-hosting.com</option>
    
    </select>        
            <script type="text/javascript">
               document.getElementById('lstAdvanceSites').onchange=loadFrm;
            </script>
            <br />
            <b><u>Note:</u></b> When you're done with the options settings. 
            <a href="javascript:window.close();">CLOSE THIS Window</a>
            <br />
            <iframe id="iframe" frameborder="0" marginheight="0" marginwidth="0" name="myframe"
                scrolling="no" style="width: 100%; height: 1000px; display: none;"></iframe>
          
            <br /><br />
            <b><u>Note:</u></b> When you're done with the options settings.
            <a href="javascript:window.close();">CLOSE THIS Window</a>
            <br /><br /><br />
        </div>
        
    <div>
    
    </div></form>
    </body>
    </html>
    As you can see the above source doesn't show the php code which is embedded. The view source does not allow for this. I'm not sure why. ALl the fields are there though. When I click on the error in the lowerleft bottom of my browser, I can open the javascript diagnoser and it highlights everything from onclick= to the first semicolon.


    <img src="sel.gif" onclick="pickerPopup202('input_field_4','sample_4');" border="0" style="cursorointer" alt="select color" title="select color">&nbsp;<input type="text" size="9" ID="input_field_4" value="">&nbsp;<input type="text" ID="sample_4" size="1" value="">

    The colorpicker code is the 202pop.js above in the head area. I have tested the program in a simple html page and it works fine. However this page here loads a form (php) and it displays a number of fields.

    This little block here displays a paint pallete which when you click on it, it is supposed to open up the pallate of colors and you click on a color and then it places the hex number for the color into a text box. I'm getting an error right now that says;

    line 140
    error object expected
    char 1
    and the url.
    The line 140 of this file is the line below ?>


    include $page.".php";
    ?>

    </body></html>

    Is there a common reason for this error message? If you are a good javascript programmer, let me know. I can send you the files for this so you can see the error message. Thanks
    Last edited by goodlinks; 10-05-2008 at 06:44 AM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •