Location: PHPKode > scripts > CuteEditor - PHP HTML Editor > Relative-or-Absolute-URLs.php
<?php include_once("cuteeditor_files/include_CuteEditor.php") ; ?>
	  <title>Relative or Absolute URLs, which do you prefer? -- PHP Content Management, PHP WYSIWYG, PHP HTML Editor, PHP Text Editor</title>
      <link rel="stylesheet" href="php.css"  type="text/css" />
      <script type="text/javascript">
	      function jumpTo(strMenu) {
		      if (strMenu.value != "")
				window.location.href = window.location.pathname + "?URLType=" + strMenu.value ;
		      return true;
          $URLType = "Default";
          if (@$_GET["URLType"]!="")
          function Checked($value,$Checking_String)
              return "checked";
              return "";
	<form name="theForm" action="Get_HtmlContent.php" method="post">
      <h1>Relative or Absolute URLs, which do you prefer?</h1>
      <p>With Cute Editor, you have the choice of using either relative or absolute URL.</p>
      <br />
      <table border="0">
          <td><input type="radio" name="RadioList" <?php echo Checked("Default", $URLType) ;?> value="Default" onclick="jumpTo(this)" />Default</td>
          <td><input type="radio" name="RadioList" <?php echo Checked("SiteRelative", $URLType) ;?> value="SiteRelative" onclick="jumpTo(this)" />SiteRelative Urls</td>
          <td><input type="radio" name="RadioList" <?php echo Checked("Absolute", $URLType) ;?> value="Absolute" onclick="jumpTo(this)" />Absolute Urls</td>
      <br />
            $editor=new CuteEditor();
            $editor->Text="<div><a href=\"some.htm\">This is a relative path</a><br><br><a href=\"/some.htm\">This is a Site Root Relative path</a> <br><br><a href=\"Http://somesite/some.htm\">This is a absolute path.</a><br><br><a href=\"#tips\">This is a link to anchor.</a><br><br></div>";
            $editor->EditorBodyStyle="font:normal 12px arial;";
			$editor->AutoConfigure = "Simple";
			$editor->ThemeType = "OfficeXp";
			$editor->URLType = $URLType;
            //use $_POST["Editor1"]to retrieve the data
Return current item: CuteEditor - PHP HTML Editor