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
S

Sean G Murphy

@Sean G Murphy
About
Posts
7
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C# to Mono
    S Sean G Murphy

    Does anyone know a good C# to mono converter?

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp question

  • Help Passing ArrayList form C# to Javascript
    S Sean G Murphy

    Definitely a great idea and one I hadn't thought of, but unfortunately it didn't work. I even tried creating it as an object[] then putting that into a collection. Arg :(

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp javascript html data-structures help

  • Help Passing ArrayList form C# to Javascript
    S Sean G Murphy

    I am creating an ArrayList in C# then passing it to a javascript in a webbrowser. When trying to read values, I keep getting an "undefined" value for the Array item , i.e. sData[3] in the javascript. If I do an alert(sData.Count) it does display the correct count for the Array. Everything up to reading the Array works, the select box gets cleared, etc. But then nothing is passed. Any help would be appreciated. C# code: public class MainForm : Form { ArrayList SelectDisplay = new ArrayList(); ArrayList SelectData = new ArrayList(); void PassData_BtnClick(object sender, EventArgs e) { FillSelectArrays("Start","none"); FillSelectArrays("One Test","one"); FillSelectArrays("Two Test","two"); FillSelectArrays("Three Test","three"); browser.Document.InvokeScript("FillSelectFromArrays", new object[] { ch.Name, SelectDisplay, SelectData }); } private void FillSelectArrays(string display, string data) { //The Arrays are already defined SelectDisplay.Add(display); SelectData.Add(data); } private void ClearSelectArrays() { SelectDisplay.Clear(); SelectData.Clear(); } html & javascript:

    Test Array: Values Will Appear Here

    function FillSelectFromArrays(sName, sDisplay, sData) { var stot = document.forms[0][sName] EmptySelect(stot) with (stot) { //Rewrites the text and values alert("sData[3] = " + sData[3]); for(i=0; i < sDisplay.Count; i++) { options[i]=new Option(sDisplay[i], sData[i]); } options[0].selected=true } } function EmptySelect(sName) { var tot = sName.options.length for (i=0;i<tot;i++) { sName.options[i]=null } sName.options.length=0; }

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp javascript html data-structures help

  • Query Question [modified]
    S Sean G Murphy

    I have three tables Item(Item_ID, Item_Name) 1 shirt 2 hat Color(Color_ID, Color_Name) 1 blue 2 red 3 green Item_Color(Item_Color_ID, Item_ID, Color_ID) 1 1 1 2 1 2 3 2 1 4 2 2 5 2 3 What is the query that would give me the result: Item_ID Item_Name Color_Name1 Color_Name2 Color_Name3 1 shirt blue red null 2 hat blue red green I seem to continue to come up short. I tried: Select Item_Name, GROUP_CONCAT(DISTINCT Item_Color) FROM Item Left Join Item_Color On Item_Color.Item_Id=Item.Item_ID Left Join Color ON Item_Color.Color_ID=Color.Color_ID Group By Item_Name but this returns the colors in a blue,red,green format, not in seperate columns. -- modified at 20:01 Tuesday 24th July, 2007

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    Database question database

  • C# Webbrowser and form questions
    S Sean G Murphy

    That lead me perfectly down the path I needed to go. Thanks RepliCrix! For anyone else out there, the code I used was C# public form1() { InitializeComponent(); // Make the form the scripting object browser.ObjectForScripting = this; // Display the html file file.html browser.Navigate(Application.StartupPath + "\\file.html"); } void Button1Click(object sender, EventArgs e) { foreach(HtmlElement elt in browser.Document.Forms) { foreach(HtmlElement child in elt.GetElementsByTagName("INPUT")) { browser.Document.InvokeScript("SendTypedText", new object[] { child.Name }); } } } public void ShowText(string ibox_name, string ibox_value) { MessageBox.Show(ibox_name + " = " + ibox_value); //Of course now you can do whatever you need to do with the data } //file.html code

    Box1:
    Box2:
    Box3:

    //Send Back Input Values function SendTypedText(param) { var thisForm = document.forms[0]; window.external.ShowText(param, thisForm[param].value); }

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp html database help question

  • C# Webbrowser and form questions
    S Sean G Murphy

    I want to read the text from input objects, like a basic textbox for a name, in an html document but without it having to be "post"ed. here's an example

    Name:
    Address:

    Notice there is no submit button on the form. Someone would fill in their name and a line of their address then click a System.Windows.Forms.Button Here is my code (which doesn't work) foreach(HtmlElement elt in browser.Document.Forms) { foreach(HtmlElement ch in elt.GetElementsByTagName("INPUT")) { MessageBox.Show("Text = " + ch.InnerText); } } I was expecting it would show the text that was typed in but I keep getting a blank return. Any help would be great!

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp html database help question

  • C# Webbrowser and form questions
    S Sean G Murphy

    Ok here's the skinny: I want to allow users to create their own forms and they are familiar with html, hence they will write them in html. It is basically data entry, but in varying formats. I want to be access the information they put in the various input boxes through my windows application. Is there a way to query the forms they create. In other words, can I have their forms in an html browser on one panel and have the submit button on another panel where the code would reside and I can see their entered data? I appreciate any and all help!

    Thanks! Sean Murphy "All things great and small start at the same point, the first step."

    C# csharp html database help question
  • Login

  • Don't have an account? Register

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