Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

LordLothar

@LordLothar
About
Posts
41
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Draw on top of picture
    L LordLothar

    I have a picture added to my jpanel content pane like this: imagePanel = new ImagePanel(); contentPane.add(imagePanel, BorderLayout.CENTER);

    File selectedFile = new File("map.jpg");
    currentImage = ImageFileManager.loadImage(selectedFile);

        imagePanel.setImage(currentImage);
        frame.pack();
    

    How I can draw a circle on top of that loaded picture? Thanks in advance, Im new in this area.

    Java question

  • Reload parent page
    L LordLothar

    I have main page a.html that use window.open to show (let say b.html) confirm dialog. I dont use Javascript 'confirm' dialog because I need to show my table format in it. In my b.html has confirm button and simply when clicked, it close the b.html page and refresh my a.html. I have problem refreshing the a.html (currently open). I need to find some kind of link identified between two html page to communicate. Any solution or other way to solve this?

    Web Development javascript html help question

  • IE: innerHTML to table id
    L LordLothar

    My bad, what I mean is, first I tried it in JavaScript (never mind about this). Since I use session in php thus I will loop my array and put it in DOM. I should try this before asking, below are example I have to create DOM in php. I will change the element name as html table later. What concern me this will also return string or xml format? to xhr.responseText, in the end I have to display this using innerHTML to tag id I have in my html page. Will that still work in IE?

    ECHO (toXml($myCart));

    function toXml($aCart)
    {
    $doc = new DomDocument('1.0');
    $cart = $doc->createElement('cart');
    $cart = $doc->appendChild($cart);

    foreach ($aCart as $Item => $ItemName)
    { 
    	$book = $doc->createElement('book');
    	$book = $cart->appendChild($book);
    	$title = $doc->createElement('title');
    	$title = $book->appendChild($title);
    	$value = $doc->createTextNode($Item);
    	$value = $title->appendChild($value);
    	$quantity = $doc->createElement('quantity');
    	$quantity = $book->appendChild($quantity);
    	$value2 = $doc->createTextNode($ItemName);
    	$value2 = $quantity->appendChild($value2);
    }
    

    $strXml = $doc->saveXML(); // this serializes the XML as a string
    return $strXml;
    }

    This is my previous post of php code that return string with element tr and td (which doesnt work in IE of course):

    function toHTML($aModel,$aMaker,$aPrice,$aQty)
    {
    $tableString="<tr>
    <th>Manufacturer</th>
    <th>Model</th>
    <th>Price</th>
    <th>Qty</th>
    <th>Total Price</th>
    </tr>";
    foreach ($aModel as $item)
    {
    $tableString .="<tr id='".$aModel[$item]."'>
    <td>".$aMaker[$item]."</td>
    <td>".$aModel[$item]."</td>
    <td>".$aPrice[$item]."</td>
    <td>".$aQty[$item]."</td>
    <td>".$aPrice[$item]*$aQty[$item]."</td>
    <td><a href='#' onclick='RemoveItem(\"Remove\",\"".$aModel[$item]."\")';>Remove Item</a></td>
    </tr>";
    }

    return $tableString;
    }

    Web Development php

  • IE: innerHTML to table id
    L LordLothar

    Though I have tried before(but I am using javascript) createElement, appendChild and so on, but still doesnt work. I heard IE need tbody and tr must be in that tbody element, but still after creating that still dont work. That makes me not so confident to do it in php. Anyway I should give this a try, but any key/hint that I should know? I havent thought of including thead and tfoot element as I read from some website, any simple example for this that works?

    Web Development php

  • IE: innerHTML to table id
    L LordLothar

    I have response text of table string from php (including the tr and td )and I want to display it in my table with id= "displayCart" as follow:

    <table border=1 id="displayCart" ></table>

    document.getElementById("displayCart").innerHTML = xhr.responseText; It work in Firefox, but not in my IE7.

    Web Development php

  • Generate-id
    L LordLothar

    Let say I have this: Add The {generate-id(model)} inside AddRemoveItem() function does not appear. Am I putting it wrongly?

    XML / XSL question

  • Html-iFrame-Javascript
    L LordLothar

    Its done by window.frames["displayCatalog"].document.getElementById("displayCamera").innerHTML = xhr.responseText; So I have to change the iframe's attribute to name and not id. Thanks though for the heads up.

    Web Development javascript php html sysadmin tools

  • Php parameter to xslt
    L LordLothar

    I read somewhere I could pass parameter like this:

    $manufacturer = $_POST['manufacturer'];
    $cameraType = $_POST['camType'];
    $priceRange = $_POST['priceRange'];

    $params = array('maker' => $manufacturer,'camType' => $cameraType,'pRange' => $priceRange);
    
    
    $xsltTransformer=xslt\_create();
    $htmlOutput=xslt\_process($xsltTransformer,"camera.xml","camera.xsl", NULL, array(), $params);
    
    xslt\_free($xsltTransformer);
    

    or

    $htmlOutput=xslt_process($xsltTransformer,"camera.xml","camera.xsl", $params);

    and my xslt will have this:

    < xsl:param name="maker">All< /xsl:param>

    ..so on Which doesnt work and return always 'All'. I am using Sablotron library for transformation. How can I pass parameter correctly?

    XML / XSL xml question php data-structures

  • Html-iFrame-Javascript
    L LordLothar

    I have html which contain iframe in it. I have a button in my html which will call javascript(ajax) function and I will get server response from php script. Normally if I want to display it in my main html, I can use:

    var spantag=document.getElementById("displayCamera");
    spantag.innerHTML=xhr.responseText;

    How can I display the result into other html file/my iframe(let say I have span id in html of the iframe).

    Web Development javascript php html sysadmin tools

  • XSL Sum() [modified]
    L LordLothar

    Using dot .& lt;30 seems to be working too and less confusing instead of number(text()). Thanks for your reply.

    XML / XSL help java css xml question

  • XSL Sum() [modified]
    L LordLothar

    let say I have this:

    <books>
    <book>
    <title genre="non-fiction">Objects First With Java- A Practical Introduction Using Bluej </title>
    <author>David J. Barnes</author>
    <author>Michael Kolling</author>
    <publisher>Pearson Prentice Hall</publisher>
    <year>2006</year>
    <price>49</price>
    </book>
    <book>
    <title genre="fiction">Harry Potter and the Half-Blood Prince</title>
    <author>J. K. Rowling</author>
    <publisher>Thorndike Press</publisher>
    <year>2005</year>
    <price>29</price>
    </book>
    </books>

    and I want to sum the price if the title genre is fiction and book price is less than 30 (I should have more books for this but will add later). currently I read somewhere I came up with this:

    <xsl:value-of select="sum(/books/book/title[@genre='fiction']/price[number(text())<30])" />

    or this:

    <xsl:value-of select="sum(/books/book[title[@genre='fiction']]/price[number(text())<30])" />

    but it seems I still cant get it right. Anyone could help where I did wrong? Edited: I found the problem that I should use '& lt;30' instead of <30. I believe I did use lt before asking. Anyway, why the< b r / > in my xsl file does not work in FireFox but it is fine with IE? Many thanks.

    modified on Friday, April 17, 2009 8:28 AM

    XML / XSL help java css xml question

  • FRM-40200 field is protected against update
    L LordLothar

    In my oracle form builder, if I set the data block 'Property palette' 'Allow insert' as no. When I run the form, I cant type anything in the textfield, and that FRM-40200 field is protected against update error is announced at bottom. If the 'Allow insert' is set to yes. I can do all my stuff (querying, LOV etc) just fine. I have no problem setting the rest of 'Allow query,update,delete' to yes or no, its just 'Allow insert'. How to solve this or it has to be always yes for 'allow insert' property? Thanks in advance.

    MySQL

  • Case Insensitive Array Search
    L LordLothar

    My question is simple, I want to search a string in an array and it must not be case sensitive.

    private static String arraySearch (String[] myArray)
    {

        Arrays.sort(myArray,String.CASE\_INSENSITIVE\_ORDER);
    	String name="";
    	int index = Arrays.binarySearch(myArray, "java");
    	
    	name = "Found Java at: " + index;
    	return name;
    }
    

    Above is just a procedure, the array list is stated in main method. How can I search a word that ignore case sensitive whether its lower or upper case?

    Java question java database data-structures

  • Sql Connection1
    L LordLothar

    I would love to see the example. Sorry for double posting thread

    Visual Basic database csharp question learning

  • Sql Connection1
    L LordLothar

    Im interested when you said using one class to declare sqlconnection. Can you give me example of using it. I know im a beginner in any programming language and only VB.Net is my first programming language and I did using code to declare sql connection but i have difficulty on it and I finally ended up with using sqldataadapter.

    Visual Basic database csharp question learning

  • Sql Connection1
    L LordLothar

    I did that because every form need adapter if want to connection to sql. When i drag and drop the adapter and and set sql command, a sqlconnection1 will appear. That's why every form will have sqlconnection1. When i use other pc and copy my application, then i need to change every sqlconnection string in each form. If possible i want to set it once and all sqlconnection1.connectionstring are changed.

    Visual Basic database csharp question learning

  • Sql Connection1
    L LordLothar

    I am using sqlconnection control in vb.net and i use it for different form. Everytime if i move my database and my application to other Computer, I need to change the connection string one by one in each form and of course this is abit troublesome for me. Any ways to change the sqlconnection string in properties only 'once', and all sqlconnection string in all forms will also change?

    Visual Basic database csharp question learning

  • Sql Connection1
    L LordLothar

    I am using sqlconnection control in vb.net and i use it for different form. Everytime if i move my database and my application to other Computer, I need to change the connection string one by one in each form and of course this is abit troublesome for me. Any ways to change the sqlconnection string in properties only 'once', and all sqlconnection string in all forms will also change?

    Visual Basic database csharp question learning

  • Log File Question
    L LordLothar

    Im a beginner in VB.net. Im was about to create a text log file to record my application activity such as the user update or delete something then such activity will be recorded in text file. I have this code from code project last time: Private Shared Sub WriteToAppLog( _ ByVal message As String _ , ByVal messageType As EventLogEntryType _ ) Dim elLog As System.Diagnostics.EventLog Try elLog = New System.Diagnostics.EventLog( _ "Application" _ , Environment.MachineName _ , Application.ProductName _ ) elLog.WriteEntry(message, messageType) Catch ex As Exception 'Your error handling here End Try End Sub But im not really understand how to implement it and where i can check the log file from above code? Does it appear to be .txt file? and does above code have to be placed in every form in my vb.net? If u have any other code than above, feel free to tell me. Please help me, this is my last step of my project. Thanks.

    Visual Basic help question csharp tutorial

  • DataView - RowFilter
    L LordLothar

    The error like this again "Missing operand before 'like' operator" those message is really i cant get it.

    Visual Basic help database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups