Jump to content

kharbat

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kharbat's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [code]            var file = "<?php echo $file_dir; ?>";                          parent_form = window.parent.document.getElementById('Send_Form');             hidden = parent.document.createElement("input");                          hidden.name = "attachment_"+id;             hidden.id = "attachment_"+id;             hidden.type = "hidden";             hidden.value = file;                          parent_form.appendChild(hidden);         </script>  [/code] This is a part of the orginal code, this code exists in a page inside inline frame. It attempts to create a hidden field in the parent page. There is an error in the last line.. how can i solve it??!! on firefox it tells me "parent_form has no properties" thanks
  2. I have 2 pages page1.htm page2.htm there is an inline frame in page one refers to page2... the is a javascript in page2 such as var inner_variable = "hello"; how can i print the value of this variable from the parent page "page1 Thanks Ahmad
  3. well, that's the structure i've been using... when a user registers, 2 tables are created 'User'_inbox and 'User'_attachments .. it logical to store two tables for each user??! is there a better way?? [code] DROP TABLE IF EXISTS `user_accounts`; CREATE TABLE `user_accounts` (   `UserID` mediumint(9) NOT NULL auto_increment,   `Username` varchar(30) NOT NULL default '',   `Password` varchar(30) NOT NULL default '',   `First_name` varchar(30) NOT NULL default '',   `Last_name` varchar(30) NOT NULL default '',   `Gender` varchar(10) default NULL,   `Birth_date` date NOT NULL default '0000-00-00',   `Country` varchar(20) NOT NULL default '',   `Citry` varchar(20) NOT NULL default '',   `Alternative_email` varchar(50) NOT NULL default '',   `Occupation` varchar(20) NOT NULL default '',   PRIMARY KEY  (`UserID`),   UNIQUE KEY `Username` (`Username`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; DROP TABLE IF EXISTS `user_inbox`; CREATE TABLE `user_inbox` (   `MessageID` mediumint(9) NOT NULL auto_increment,   `MessageTime` time NOT NULL default '00:00:00',   `MessageDate` date NOT NULL default '0000-00-00',   `MessageState` char(1) default NULL,   `MessageType` varchar(10) default NULL,   `Sender` varchar(30) NOT NULL default '',   `Subject` varchar(150) default '(none)',   `Body` longtext,   `Attachment` char(1) default NULL,   PRIMARY KEY  (`MessageID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; DROP TABLE IF EXISTS `attachments`; CREATE TABLE `attachments` (   `AttachmentID` mediumint(9) NOT NULL auto_increment,   `Owner` varchar(30) NOT NULL default '',   `File` mediumblob NOT NULL,   PRIMARY KEY  (`AttachmentID`),   KEY `Owner` (`Owner`),   CONSTRAINT `attachments_ibfk_1` FOREIGN KEY (`Owner`) REFERENCES `user_accounts` (`Username`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1; [/code]
  4. nobody can help ?? hello?
  5. Its an email system.. users have inbox limited to 10 MG, each user can send and recieve messages.. attachments are also allowed.. each user can send and receive more than one attachment. each user has a profile with picture, if that's possible.. each user has favorite contacts.. user email.. consists of inbox messages, sent items, drafts, and trash bin.. is there any suggestion for tables structure?? i don't need sql statements.. i just need a description like table one: 1- bla bla (primary key) 2- blaa blaaa and so on thanks for your time
  6. the third table could be this way 1- [u]User ID , File ID[/u] (composite primary key) 2- Permission (non key attribute)
  7. hi all... do you know anyway to restrict table capacy let's say each table's data should not exceed 10 MB.. and is there anyway to retrieve current table capacity?? if there is.. can we retrieve it with php ?? thanks...
  8. yeah i think that too.. in fact the output text is a file name that might be long and continuous sometimes like this WindowsVistaBeta2ISOBuild5384432bitx86(www.fulldls.com).torrent and i guess that there is no way to deal with this problem.. Thanks alot for your time anyway.. and i really appreciate your help
  9. now what's wrong with this script ? [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] [code] <script language="javascript"> file = document.createElement("INPUT"); file.name = "t1"; file.type = "text"; forms = document.getElementById('form1'); form.appendChild(file); </script> <form id="form1" name="form1" method="post" action="">   <label>   <input type="button" name="Button" value="Button" />   </label> </form> [/code]
  10. i am not using tables actually.. but your script was pretty helpful.. i will try it and tell you what happens
  11. lol.. sure.. i will put a code below.. Try editing it with frontpage or some editior.. try to type something that exceeds cells width.. the table will resize width of the cells, so they become inconsistent.. all what i want is to know if there is a way to let cells width remain fixed when some long text entered the text get orgnized in lines rather than resizing cells.. any help is really appreciated [code] <table border="1" width="300" id="table1">     <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>     </tr>     <tr>         <td>&nbsp;</td>         <td>&nbsp;</td>     </tr> </table> [/code]
  12. i just tried style sheet.. table keeps resizing width.. any other suggestions?
  13. thanks for that... but in fact i want to create the text field.. i mean that i don't want it to be pre defined because i don't know how many text fields gonna be created in the page.. you got my point? i need a script that creates a text field from nothing.. and puts it within a specific form and that's all..
  14. i used this before and it didn't work
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.