Jump to content

MrMastermind

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

About MrMastermind

  • Birthday 03/09/1973

Contact Methods

  • Website URL
    http://

Profile Information

  • Gender
    Not Telling

MrMastermind's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, I've come a long way. I've created a solution to the problem by creating multiple sortable div's where div's from another list can be dragged into. One small issue remains. I now need to be able to restrict the sortables used as "drop-div's" to only allow one item. So I need to find a way to revert a draggable div when the sortable it is dropped on already contains an item (or element). I figure I have to do that in the onUpdate event, but have no clue how to do it. Any suggestions?
  2. Thanks for the clear explanation! That's exactly what I needed. Thanks again!
  3. Akitchin, The design of the system will be fine. But as I said, I want a generic approach. One client wants contacts with only an e-mailaddress other clients might also want to store other information like name, gender, birthday, etc... As I want the user to be able to add any kind of field to the contact I need to be able to add the fields. All custom fields will apply to all contacts added though. So, would I create the fields in a seperate table, or add them to the "contacts" table?
  4. Hi, I'm trying to figure out how to approach a way to have users create custom fields in an application. Any suggestions on how to approach this? Should I add the field directly to the table or should it be in a relational table? Thanks.
  5. Hi, I'm currently writing an import utility where you can select an CSV file and a table. From there, the fieldnames from the table will be read and the headers from the CSV file. After that a function will try to match fieldnames with column headers. But to be more generic, I want to be able to have any table and an CSV, where it could be so that the CSV has more or less column headers then there are fieldnames. To be able to match fieldnames manually It thought of creating an sortable list, so you can match the column headers. Where the fieldnames would be a static list. Something like: fieldnames matched column headers unmatched column headers 1 A 2 B 3 C 4 E 5 D 6 F Looking at the example, you can probably see my issue; sortable lists will "collapse" the list and have no empty "slots". So my question would be, how can I create the "matched column headers" and the "unmatched column headers" as a sortable drag&drap list providing some sort of gaps/"slots" to put the unmatched columns in. Or to be able to set a column header matched to an other available fieldname?
  6. Hi, I'm trying to write a function that gets the innerHTML from hidden DIV's to generate a javascript file. After the innerHTML is written to another DIV, I want to delete the div. But somehow I can't get it right. The best I could do was "d.parentNode.removeChild(child);" but that doesn't work. I've tried other approaches, but no luck. Any help would be appreciated: function createJS(){ var d = document.getElementById('eFormOutput'); var children = d.childNodes; var code = ""; for(i=0;i<children.length;i++){ var child = children[i].childNodes[0]; if(child.id.substring(0,2) == "js"){ code += "\n" + child.innerHTML; d.parentNode.removeChild(child); } } document.getElementById("jsOutput").innerHTML += code; } Thanks in advance!
  7. I was wondering if anyone had tried this. I have a generated menu which uses ul and li and the suckerfish approach for a horizontal menu. What I would like to do is generate the menu include some scriptaculous code for drag and drop and allow users to order the dropdown menus in the navigation. If someone has already done this or has any idea how to get this done I would much appreciate the tips and explanation on how to do this.
  8. Hi, We're currently testing an auction timer which updates the auction clock every second and als updates the price accordingly, using Ajax Prototype periodicalupdater() and javascript setInterval(). During testing we noticed that sometimes the clock skips a few seconds. Now I can imagine that this is due to the load the server gets from every update it has to do for every visitor that attends the auction. I can also imagine that this gets worse when more visitors attend the auction. So the question is, am I correct about the load? And is there a way to make sure the updates occur correctly for every visitor, giving them an equal change at the auction? Would it be possible to use a server-side push? or do we need to switch to another language other than PHP for that? Here's most of the code used for the clock: if (window.ActiveXObject){ var http; var timerID = 1; function dataHandle() { if ( http.readyState == 4 ) { var response = http.responseText; document.getElementById('klok').innerHTML = response; } } function UpdateTimer() { http.open('POST', 'veiling/aflopende_klok.php'); http.onreadystatechange = dataHandle; http.send(document.getElementById('klok').innerHTML); timerID = setTimeout("UpdateTimer()", 1000); } function StartTijd() { // Firefox, IE7, etc.. if (window.XMLHttpRequest){ http = new XMLHttpRequest(); } // IE 6.0, ect.. else if (window.ActiveXObject){ http = new ActiveXObject("Microsoft.XMLHTTP"); } timerID = setTimeout("UpdateTimer()", 1000); } StartTijd(); }else{ var url = 'veiling/aflopende_klok.php'; new Ajax.PeriodicalUpdater( 'klok', url, {asynchronous:true, frequency:1, method:'get'} ); }
  9. Hi, For a new project we need to be able to let users start new projects in which they can display the projects results (multimedia), like graphics and video. That's not all that exiting, but what makes it more difficult is that users should be able to add other users that participated on the projects and when clicking those you would see their profile and projects they worked on. From there you can click another project and so on. Other options that are needed are commenting on the projects and the abillity to add polls to a project. Now I know I could custom build this, but I was wondering if anyone knows of an opensource project that allows for the functionality I mentioned above? Thanks in advance for your help!
  10. I have found a workaround, I just put the SELECT inside a DIV and just update the content of the DIV completely with a new generated SELECT with all options. Still strange why IE just won't parse the options to the SELECT, but then again IE has more very strange issues... Thanks for all the support guys!
  11. I changed the SELECT to a DIV to see what I got back from the script, here's the output: [code]- Kies een subthema - <option value="1">Aardappels-Groente-Fruit</option> <option value="2">Brood</option> <option value="3">Dranken</option> <option value="4">Eieren en Zuivel</option> <option value="5">Vlees en  Vleeswaren</option> <option value="6">Voeding overig</option> [/code] As you can see, the first line doesn't contain the OPTION tag, but in the PHP script you can see below, I did send it: [code] $sql = "SELECT * FROM ".$_REQUEST['table']." WHERE pid=".$_REQUEST['pid']; $res = fmsq($sql); print '<option  value="">- Kies een subthema -</option>'; foreach($res as $key){ print '<option value="'.$key['id'].'"'; if($key['id'] == $_REQUEST['id'] ){print ' selected="selected"';} print '>'.$key['subthema'].'</option>'; } [/code] It remains a very strange issue...
  12. Guys, I also always use closing tags as they are absolutely the W3C standards! But for the sake of my problem, do you have any idea how I can solve it?
  13. Ober, Maybe you're willing to share one of your solutions so I can compare and maybe find out what is wrong with my solution?
  14. Thanks Ober, but it's only something I read on another forum and I don't see another explanation because Firefox is showing it correctly and IE messes up the code (in my view). It could very well be I'm missing something here, because I used the developer toolbar from IE to debug and display the parsed HTML. But anyway, here's the only other bit of code you did not yet see, which is the starting HTML code from where the select will be filled, the Event.observe() code in the ajax script in one of my previous replies captures the change of the select and fills it: [code] <select size="1" id="thema" name="thema"> <option selected="selected" value="">- Kies een thema -</option> <? foreach($themas as $thema){ print '<option value="'.$thema['id'].'">'.$thema['hoofdthema'].'</option>'; } ?> </select><br /> <select id="subthema" name="subthema" size="1"> <option selected="selected" value="">- Kies eerst een thema -</option> </select><br /> [/code]
  15. Thanks for the reply Artacus, but the "crap" is not generated by the script (see the code I added in my previous reply), but by Internet Explorer. So Firefox doesn't need a "wonder" to make it work, Firefox is the browser that parses the code correctly it's IE that messes up the generated code...
×
×
  • 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.